Kali inside VirtualBox (Guest VM)
This guide is about virtualizing Kali Linux inside of VirtualBox, allowing you to have a Kali VM. This is a great way to use Kali, as it is completely separate from the host, allows you to interact with other VMs (as well as the host machine and other machines on the network), and allows you to revert to snapshots.
You may wish to follow our other guide if you are trying to install VirtualBox on Kali Linux (as a host).
The guide below is what we use to generate our pre-made Kali Linux VirtualBox images. You may alter this to your needs. We always generate the images using the latest version of VirtualBox.
You may need to enable virtualization in your BIOS/UEFI for (e.g. Intel VT-x/AMD-V)
Wizard
Upon starting up VirtualBox, select βNewβ (Machine -> New).
The next screen is βName and operating systemβ which is where you name the VM. This name is also used in any filenames (such as the configuration, hard disk and snapshot - which isnβt changed from this point).
We are keeping it generic in this guide (as Kali is a rolling distribution, and we update it), however for our releases, we use the version number in the name as it is a fixed release (kali-linux-YYYY.N-vbox-ARCH
. Example: kali-linux-2022.4-vbox-amd64
).
For the βTypeβ, we set it as Linux
. For the βVersionβ, we are going to be using the x64 desktop image, so we are going to select Debian (64-bit)
.
βMemory sizeβ is the next section, where we can define how much RAM to use. Again, the higher the amount of RAM, the more applications can be open and at increased performance. Various tools inside of Kali can be demanding of resources. When we make the general VMs, we select 2048 MB
(2GB) for RAM, but we often increase this for our personal machines as we have high-performing devices with spare RAM which Kali can utilize.
This screen below, βHard diskβ, allows us to Create a new virtual disk now
.
For the βHard disk file typeβ, we select VDI (VirtualBox Disk Image)
(and its the default option).
For the following screen, βStorage on physical hard diskβ, we go with the default option of Dynamically allocated
.
Now with βFile location and sizeβ, we can now define how large the virtual hard disk will be. We use 80.00 GB
for our VMs.
After clicking on βCreateβ, the wizard is complete.
Now we click on βSettingsβ, to customize the VM further.
In βGeneralβ -> βAdvancedβ, we make sure to set βShared Clipboardβ to bidirectional
, as well as βDragβnβDropβ to bidirectional
In βSystemβ -> βMotherboardβ, we change the βBoot Orderβ to make sure Hard Disk
is top and Optical
is the second. Everything else is disabled.
In βSystemβ -> βProcessorβ, we increase the βProcessor(s)β to be 2
.
At the same time, we also enable βExtended Featuresβ for Enable PAE/NX
.
In βDisplayβ -> βScreenβ, we make sure to have βVideo Memoryβ set to 128 MB
Another item to point out is to make sure that βAccelerated 3D graphicsβ is disabled, as people have reported that causes issues.
The final settings view looks like the following:
When we are ready to go, press βStartβ.
The first time we run it, we will get a prompt saying do we wish to mount an image to use as a βstart-up diskβ. We want to use our Kali image, rather than a physical drive, so we select the icon to the side of the drop down.
A new pop up will open, βOptical Disk Selectorβ. We will now press βAddβ, then navigate to where our ISO is located.
After pressing βOpenβ, we can see its been added, so we make sure its selected and press βChooseβ.
All that is left now to do is press βStartβ.
After all this is done, we save, start up the VM, and then continue installing Kali Linux as we normally would for a bare metal install.
During Kali Linux setup process, the install wizard should detect if its inside a VM. If it is, should then automatically install any additional tools (such as virtualbox-guest-x11
) to give a better user experience. If you want to manually re-install it, you can see our VirtualBox Guest Guide.
Last updated