Virtualbox Guest Additions, the secret of a perfect virtual machine

Ubuntu inside Kubuntu with VirtualboxAlthough there are many more options, the most famous for creating virtual machines in Linux is Virtualbox. With this Oracle software we can create virtual machines of almost any operating system, but there is a problem: what we will see will be an operating system in a square window with very large icons. How can we solve this? "Simply" installing Guest Additions on any virtual machine. In this article we will show you how to do it in Ubuntu.

Installing Guest Additions in a Virtualbox virtual machine is "simple", in quotes. And it is that, if we do it directly as it should be, may give us an error. First, we will have to take a few previous steps and then do a kind of "trick" so that the virtual machine reads the ISO as it should. From what it seems and at least in my case, nothing works if we use the system designed for it. I explain how I have achieved it below.

Installing Guest Additions on Ubuntu

The previous steps and the little trick are the following:

  1. We install any virtual machine. This can be done after the next two steps. You have a tutorial on how to create a here.
  2. We check that we have the latest packages of the necessary software. To do this we will open a terminal and write these commands:
sudo apt update
sudo apt upgrade
sudo apt install build-essential dkms linux-headers-$(uname -r)
  1. Next we install the compatibility packages with this other command:
sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms
  1. We restart the computer and then we start the virtual machine.
  2. Let's go to "Devices / Insert Guest Additions CD Image".

Install Guest Additions from the menu

  1. It will give us an error if we do not have it downloaded and the possibility of downloading it. We accept and download it. If we don't see an error, we follow the instructions and we have it. If we see any failure, we continue.
  2. We do step 5 again.
  3. In the window that asks us if we want to download the tools there is a link. We copy it. Alternatively, we can go to your download website, choose the version of Virtualbox that we are using and download the ISO from its source. You have the latest version here. If we do so, we skip step 9.
  4. We paste the link in a web browser like Firefox and press Enter. The ISO download will begin.
  5. The trick begins by going to the Machine / Configuration menu in our virtual machine.
  6. Let's go to Storage / Empty, which is the DVD drive.
  7. On the right, we click and choose "Select Virtual Optical Disk File."

Insert ISO

  1. We choose the ISO that we have downloaded in step 9. The "autorun" of the CD will allow it to start automatically.

Installing Guest Additions on Ubuntu

  1. We click run and wait. When the process is finished, the window will change automatically and we can put it on full screen. We can also go to Machine Settings / General / Advanced and activate "drag and drop" to share files, among other things.

Before ending this article I would like to clarify something that I think I have made clear from the beginning: this method is not the official one, but one that will help us if the official fails us, as it is in my case. Has it worked for you and do you already have a perfect virtual machine on Linux?


The content of the article adheres to our principles of editorial ethics. To report an error click here.

2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Rafa said

    I have always done it in the debian-based ones as follows

    I do everything inside the virtual machine

    1- From the virtual machine we open a terminal and type
    $ sudo apt install virtualbox-guest-additions-iso
    2 Then I go to the / usr / share / virtualbox / folder and mount the iso that is inside I open this iso and open a terminal at the address where it has been mounted and execute the following command:
    $ sudo sh VBoxLinuxAdditions.run
    And with this, the guest additions will be installed, if it fails us here, it has ever happened to me, we simply create a folder on the desktop or wherever we want, we give it the name we want, preferably without spaces, and copy the content of the iso inside from this folder, we go to it through the terminal and execute the previous command, and that's it, it will be installed.

  2.   Papilemonotak said

    Explained perfect works great