In this article, we will examine how to install the Oracle VM VirtualBox virtualization program on the Kali Linux 2020.1 operating system.
How to Setup Oracle VM VirtualBox on Kali Linux
Kali Linux is a Debian-based Linux OS developed by Offensive Security. If you have not installed Kali OS before, you can check out our article here.
Oracle VM VirtualBox is a free virtualization application that can be installed on Intel and AMD processor computers. Oracle VirtualBox virtualization software can be installed on operating systems such as Windows, Linux, macOS, Solaris.
Running Oracle VirtualBox on Windows is very easy, but when you setup VBox on a Linux distribution, you may sometimes encounter the errors.
Installing Oracle VM VBox on Windows is very easy, but you may sometimes encounter installation errors when installing VBox on a Linux distribution. Therefore, in our previous articles, we prepared detailed guides for Linux systems:
The newest feature of Kali Linux was released on January 28, 2020, which provides an additional layer of security with a non-root user account. If you have updated your system to this version, it will be useful for you to install the 6.1 version of Oracle’s VirtualBox software.
So what’s new in VirtualBox 6.1?
The Oracle Team released the 2nd maintenance release of VirtualBox 6.1 on January 15, 2020. This release mainly includes Kernel 5.5 support for Linux hosts, Multi-Monitor and Resize support for Linux Guests and Oracle Critical Patch Updates.
Follow the steps below in order to install the Oracle 6.1.2 virtualization software on your Kali system.
First, visit this address to download the VBox for Linux OSs to your computer, and then click Linux Distributions in the Platform Packages section, as you can see in the image below.
You should choose Debian for your Kali system from the options listed on the Linux distributions. Now, click on Debian 10 option.
After downloading the VBox, open Terminal and view the Downloads folder. Then run the following command to install the installation file with the DEB extension:
After trying to install VirtualBox again, this time you will encounter the following error and continue to the next step to fix this error.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
The distribution packages containing the headers are probably: linux-headers-amd64 linux-headers-5.4.0-kali3-amd64
Execute the sudo apt-get install dkms build-essential command to install Header files based on your current Kernel version.
sudo apt-get install dkms build-essential
After installing the dkms package, you can now run VirtualBox on your Kali computer. To do this, type the command virtualbox in Terminal and press Enter.
You can easily learn the version of Oracle VirtualBox from the About section after clicking on the Help tool menu.
You can watch the video below to install VBox on Kali step by step and create a new virtual machine, and you can also subscribe to our YouTube channel to support us!
How to Create a New Virtual Machine on Kali
After installing Oracle VirtualBox on your Linux computer, you can now create a new virtual machine and use a Windows 10 or other Linux distribution.
To create a new virtual machine using VirtualBox on Kali Linux, follow the steps below in order.
Run VirtualBox and click on the Machine option you see in the toolbar and click New.
When the Create Virtual Machine wizard opens, type in the name of the operating system you will install in the Name section. For example, as soon as Windows 10 writes, the Type and Version sections will be determined automatically.
You need to set the Memory Size setting for Windows 10 based on your computer’s hardware capacity. For example, if your computer has 16 GB of RAM, you can configure 2 or 4 GB of RAM size for the Windows 10 virtual machine.
To create a new Windows 10 virtual disk, select Create a Virtual Disk Now and click the Create button.
Check the VDI (VirtualBox Disk Image) option that VirtualBox uses by default as the Hard Disk File Type and click Next.
In the Storage on Physical Hard Disk window, you can select the virtual disk you create as a fixed-size or dynamically expanding type. In this step, check Dynamically Allocated and click Next.
In the File Location and Size window, configure the size of the Win10 virtual disk and where to save it.
After installing the Windows 10 machine in Kali, open the operating system settings listed on the left side of the VBox and click the Choose a disk file option as shown in the image below to add the ISO image file to your virtual computer and start the system setup.
How to Run Oracle VM VirtualBox 5.x on Kali Linux 2019.x
VirtualBox is the most preferred application because it is free virtualization software. To install Oracle VBox Software, follow the steps below.
To download VB Software for Linux, visit https://www.virtualbox.org/wiki/Downloads and click on Linux distributions.
If you are using Kali 64 Bit version, you need to download the Amd64 version. Kali is Debian based, so please click on the Ubuntu 18.04 / 18.10 / Debian 10 option to download VB Software.
Open the Terminal on Kali and navigate to the location where you downloaded the VM Software. To start setting up Oracle VM software on Kali, execute the dpkg -i virtualbox-5.0_5.0-Ubuntu-bionic_amd64.deb command in Terminal.
As you can see in the image below, there was an error with dependent packets in the program setup. To run VBox in Kali OS, you must install these dependent packages.
To install libcurl4, libqt5opengl5, libqt5x11extras5, and libsdl1.2debian for VB installation, it is best to update Kali OS repositories first. Execute nano /etc/apt/sources.list in Terminal and add the following addresses.
Use the apt-get update command to update your system’s package lists.
In order to install Oracle VM Sofware, execute apt-get install dkms build-essential in Terminal to install dependent packages.
apt-get install dkms build-essential
If you encounter an error during installation, execute “apt –fix-broken install” command in Terminal.
After you build VBox to your system, type virtualbox in the terminal and press Enter to run the program. If you encounter a kernel (4.15.0-kali2-amd64) error while running VBox Software as in the image below, proceed to the next step.
To fix the kernel (4.15.0-kali2-amd64) error, first download the package from here to your computer and then execute the dpkg -i linux-headers-4.15-0-kali2-amd64.deb command in Terminal.
dpkg -i linux-headers-4.15-0-kali2-amd64.deb
When installing the kernel (4.15.0-kali2-amd64) package, you can check the following image to see if there are any required packages. These packages; linux-headers-4.15.0-kali2-common, linux-kbuild-4.15, and linux-compiler-gcc-7-x86.
You can find linux-headers-4.15.0-kali2-common, linux-kbuild-4.15, and linux-compiler-gcc-7-x86 in the folder you have downloaded. Build the dependent packages on your system as follows.
After you successfully setup VirtualBox on Kali, you can learn the version of the program from Help / About.
How to Download and Configure Extension Pack for VBox
After running the Oracle VM VirtualBox virtualization software on your system, the first thing you must do without creating a new VM is to add the Extension Pack software to the program.
So if you want to learn how to add the Extension Pack to Oracle virtualization software step by step, you can click on the image below to see our article.
To apply these steps, you can also watch the video tutorial below.
In this article, we have examined how to set up Oracle VM software on Kali Linux and how to build dependent packages step by step. Thanks for following us!