In this article, we will examine how to install the 6.1 version of Oracle VM VirtualBox and Extension Pack, which allows you to create a new virtual machine on the Linux / Ubuntu 20.10 (Groovy Gorilla) distribution.
How to Set Up and Run Oracle VM VirtualBox 6.1 on Ubuntu 20.10
Oracle VM VirtualBox allows you to create virtual machines and install and run Windows, Linux, or macOS operating systems on desktop or laptop computers you are using. However, in order to create virtual computers using this software, your processor must have a virtualization feature. To find out if your processor supports virtualization, you will need to visit your hardware manufacturer’s website or use a 3rd party software.
After installing the VirtualBox program on your Linux computer, you can create a new virtual machine and start the operating system installation by integrating the ISO files of the operating systems into this machine. The biggest advantage is that it is open source and completely free.
After running the virtualization software on the Linux system, you need to download and install the Extension Pack required for the program. Thanks to this software, you can use the hardware of your host devices such as a USB, Webcam, or network card in guest machines.
From the Downloads section, click on Linux distributions.
On the Download VBox for Linux Hosts page, click on Ubuntu 19.10 / 20.04.
The VirtualBox program has the exe extension on Windows and the deb file extension on Linux systems. On Linux systems, packages with deb extensions are usually installed with the dpkg command.
Press CTRL + Alt + T together on your Ubuntu operating system to open the terminal and navigate to the location of the debug package you downloaded to your computer and execute the command below to start the installation.
sudo dpkg -i virtualbox-6.1_6.1.18-142142~Ubuntu~eoan_amd64.deb
After extracting the VBox package with the deb extension, execute the “sudo apt install -f” command and start the installation process. Next, press the Y key and then Enter to confirm the installation of additional packages and use of additional disk space as shown in the image below.
sudo apt install -f
After installing the Oracle virtual machine software, type virtualbox and press Enter to launch it in the terminal.
After trying to open the VirtualBox program, you may get an error like the image below. Because the necessary kernel module for VBox is not installed. If you do not fix this error, you will not be able to start the VMs as indicated in the alert.
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (5.8.0-41-generic) or it failed to
load. Please recompile the kernel module and install it by
You will not be able to start VMs until this problem is fixed.
To fix the vboxdrv kernel error, you must first download and install the required dependent package. To do this, download the package related to the wget command in the terminal and install it with the dpkg command.
For the vboxdrv error, you need to install and compile Linux kernel headers, otherwise, the virtual machines you created as in the warning above will not be able to start. To install VirtualBox Linux kernel headers, execute the following command in the terminal and then press Y and then Enter to confirm the installation of additional packages and the additional disk space usage.
Execute the following command to restart the VirtualBox services and recompile the kernel modules.
Now, run the Oracle VM software again in the terminal and check for any errors. After installing the necessary packages, the virtualization software will run smoothly on your Ubuntu system.
To check the version of the VBox software, click Help and then About from the tool menu.
How to Install Extension Pack
The first thing you need to do after installing the Oracle software is to install the Extension Pack to make virtual machines work more efficiently.
After installing VBox on your system, you need to install Extension Pack. The main purpose of installing Extension Pack is to use virtual machines more effectively. After installing this package, you can exchange files between the virtual machine and your physical computer, and you can also use the virtual machine in full-screen mode.
Visit the website where you downloaded the VirtualBox program again, and then click on the All supported platforms option as in the image below to download the Extension Pack.
Double click on the vbox-extpack file you downloaded to the Downloads location to start its installation.
As soon as you double click the file, the VirtualBox – Question window will open as follows. In this window, you are informed that you need to install Extension Pack to use USB devices, webcam, RDP, PXE ROM, disk encryption, and NVMe features on guest machines. To use the specified features, click the Install button to start the installation.
To accept the license agreement, scroll down the page and the I Agree button will be active.
Type the root password you set when installing your Ubuntu system and click the Authenticate button.
After the installation is completed, click the OK button in the warning window that indicates that the Extension Pack was successfully installed.
To verify that the extension package is installed, first, click on File / Preferences.
After clicking Extensions from the options on the left, you can see that the relevant package has been added in the Packages section.
How to Create a New Virtual Machine on Ubuntu
After installing Oracle VM VirtualBox without any problems, you need to create a new virtual machine and examine if there are any errors. So, in this article, we will prepare a Windows 7 virtual machine on a Linux distribution and start its installation.
From the VBox tool menu, click Machine and then New.
In the Name and Operating System window, configure the name, installation location, type, and version of the virtual machine you will create and click Next.
In the Memory Size window, specify the amount of RAM you will allocate for the virtual machine and click Next.
In the hard disk configuration window, the virtual disk size will be automatically adjusted according to the operating system version. Since older operating systems will take up less disk space after installation, or configure a virtual disk size according to the size of your disk and the operations you will do on the virtual computer.
Select VDI (VirtualBox Disk Image) as the hard disk file type and click Next.
You need to determine the size of your virtual computer’s virtual disk on the physical disk of your host. There are two options here, Dynamically Allocated and Fixed Size.
If you choose a fixed disk size, it may take some time to create the virtual disk, but this is more efficient than the other option. Dynamically Allocated option refers to the disk space to be allocated from your physical disk as much as the disk space required by your operations on the virtual machine according to the disk size you specified.
If you are creating a virtual machine to perform small-scale tests or experiments, continue by choosing your Dynamically Allocated option.
In the File Location and Size window, select a location where your virtual disk will be stored. Click the Create button as it is helpful to choose the default location here.
You need to configure a few features of the virtual operating system you are creating, such as boot sequencing or virtualization features. After creating the virtual disk, click the Settings button as shown below.
In General / Advanced location, configure Shared Clipboard and Drag and Drop settings as Bidirectional to enable file sharing and drag and drop feature between your host and VM.
Remove Floppy from the Boot Order settings in System / Motherboard and configure the Hard Disk device as the primary device.
In System / Processor location, you can adjust the number of processors depending on the hardware features and performance of your host computer. For example, if you have an Intel i7 10th processor, you can set a minimum of 4 or 8 CPUs here.
In the Display / Screen location, enable the Enable 3D Acceleration option for a more effective and quality display.
If you want to connect a USB 3.0 supported External HDD to the virtual machine, enable USB Controller and tick the USB 3.0 (xHCI) Controller option.
After making the necessary settings, you need to add the ISO image, which is the installation file of a Windows or another operating system, to your VM. To add the ISO file to the virtual computer, click on Storage / Empty / Optical Drive and click Choose/Create a Virtual Optical Disk from the opened options.
Click the Add button to select the location of the ISO image in the Optical Disk Selector window.
Select the relevant file from the location where you downloaded the ISO file and click the Open button.
Check the Windows 7 image file you added and click the Choose button.
Click OK to close the settings of the Win7 virtual machine.
After clicking the Start button, you can now see that Windows is copying the necessary files.
How to Uninstall / Delete VirtualBox on Ubuntu
After installing VBox on Ubuntu, a shortcut is created in the Show Applications menu, a VMs folder where virtual machines are installed in the Home location, and a folder in /usr/lib/where the necessary files are kept. Also, a new group called vboxusers is created in user groups.
To completely delete or remove VirtualBox from your system, you have to delete all these locations or files. The easiest way to do this is to use a terminal.
In the image below, you can see folders and shortcuts created in four different regions. Now move on to the next step to start deleting them completely from the system.
First, execute the following command in the terminal to uninstall the Oracle software-dependent packages and setup files.
sudo apt remove --purge *virtualbox*
In the Package section, press Y and then Enter to confirm the packages to be removed from your system.
To delete the VirtualBox VMs folder in the Home location where the virtual machines are installed, execute the following command.
sudo rm -rf ~/"VirtualBox VMs"
To delete the configuration files of all the settings you have made in the Oracle software, execute the following command.
sudo rm -rf ~/.config/VirtualBox/
After using the remove command, you will see a message in the terminal stating that the location /usr/lib/is not empty. You can delete the files in this location as you no longer need them, to do this, execute the command below.
sudo rm -rf /usr/lib/"virtualbox"
Finally, one of the most important components you should delete is the VirtualBox user group. First, check if the vboxusers group removed with the compgen command, and then delete the group with the groupdel command.
You can also install and use Oracle software on older versions of Ubuntu. It is useful to always keep your Linux computer up to date. If you still prefer to use the old version, you can install this virtualization software on your system.
In this article, we have installed the Oracle VM virtual machine software step by step on the Linux distribution and then configured the Extension Pack. Then we have created a new virtual machine and added the Windows 7 image to the VM as an example and ran it and checked it. Finally, we have examined how to remove VBox completely from the system. Thanks for following us!