
Table of Contents
A detailed guide on installing Kali Linux on VirtualBox
A lot of the users would like to do crazy stuffs with their Kali Linux. If you’re doing something you’re not sure, you want to install unknown packages, modify some code but don’t want to break your HOST OS, running and installing Kali Linux on VirtualBox is the best way to go. You could also try using VMware but as VMware is proprietary and VirtualBox is free to use, there’s no argument which way usual users would go. Running Kali Linux on VirtualBox is great as in that way all you need to do is take a snapshot and if you break sometime, you can quickly roll back. This imposes another problem though. If you keep breaking things and keep rolling back for everything, you don’t really learn the Operating System itself. You are learning to bypass and overlook a problem with a easy way out. I am going to judge that? Maybe not. Linux can be quite complicated sometimes specially you never used it before. You might have just heard about Kali Linux from a friend and learned how much it can achieve and wanted to give it a try without actually installing it in your hard disk alongside your primary OS (may that be Windows or Linux or MAC).
Pros of running Kali Linux on VirtualBox
- You can run more than one OS simultaneously.
- You can install/re-install/backup/move/restore/rollback your guest OS easily.
- You can manage allocation of resource (Memory, Hard disk). Resource Management!
- You can copy your VirualBox to a different machine. Portability!
- You can completely break your installation and roll back in few clicks.
- You’re forced to troubleshoot and thus learn.
- Great for learning and testing.
Cons of running Kali Linux on VirtualBox
- Performance drop. Usually much slower.
- GPU Acceleration doesn’t work.
- USB Wireless cards can be problematic.
- You tend to avoid learning troubleshooting and just rollback quite often.
- You won’t be comfortable installing and running in real machine if you’re too used to VM’s.
- Can’t use FULL graphics as the card is Virtualized.
- Adds an additional layer between OS and actual hardware.
Saying all that, it’s true for any Virtualized environment. If you’re learning, testing.. yes go ahead. Even best one uses VM’s to test cause it’s just too much time consuming to install and re-install and update.
What is VirtualBox
VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use. It is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) v2. Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8), DOS/Windows 3.x, Linux (2.4, 2.6 and 3.x), Solaris and OpenSolaris, OS/2, and OpenBSD.
VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Oracle ensures the product always meets professional quality criteria.
Things you need to install
As I am going to show this in Windows here’s the link to Windows installer. You can download MAC or Linux installer and follow EXACTLY the same steps to install and run VirtualBox in your machine.
- VirtualBox 4.3.10 for Windows hosts x86/amd64
- VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack for All supported platforms
Extension pack provides the following added functionality:
- The virtual USB 2.0 (EHCI) device;
- VirtualBox Remote Desktop Protocol (VRDP) support;
- Host webcam passthrough;
- Intel PXE boot ROM and
- Experimental support for PCI passthrough on Linux hosts.
If you need instructions on how to install VirtualBox in your machines (may that be a Windows, Linux or MAC or Abracadabra, refer to their User Manual. VirtualBox user Manual is VERY detailed and specific installation instruction can be found here.
Download page: https://www.virtualbox.org/wiki/Downloads
Kali Linux
I mean if you don’t know what Kali Linux is, you wont be here!! Right? Anyhow, Kali is the Hindu goddess associated with empowerment! I’m just kidding. Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security Ltd. It was developed by Mati Aharoni and Devon Kearns of Offensive Security through the rewriting BackTrack, their previous forensics Linux distribution. Say hi to Mati and Kali Dev team at www.kali.org.
You need to download the latest version of Kali Linux ISO from here.
You can also download from CDImage Page here:
I would personally suggest downloading using TORRENT and it seems more stable and less chance of data corruption.
In this guide I will outline very detailed step by step instructions on installing Kali Linux on VirtualBox where Windows 7 is the HOST operating system.
Installing Kali Linux on VirtualBox
In this guide, I will cover the followings:
- Create a new Virtual Machine
- Create a new Virtual disk (VDI, dynamic allocation etc.)
- Modifying some VirtualBox settings (allocating physical and Video memory, selecting OS Type, CPU acceleration etc.)
- Loading Kali ISO
- Booting Kali ISO (initial info, location, timezone etc.)
- Kali disk partitioning (you should try other ways than I’ve showed here to learn)
- Finalizing instllation and running Kali on VirtualBox.
- Install Virtualbox Guest Additions packages
You have two options here to follow this guide,
- You can just use the slideshow in this page and pretty much follow that..
- You can read this really long informative guide to get a better understanding of what to do
So choice is yours.
Step 1: Create a new Virtual Machine
I’ve already given instructions and provided links on how to get VirtualBox and install that above. If you’ve missed it, go back and install VirtualBox.
Once you’ve installed VirtualBox,
- Open it.
- Click on New to create a New Virtual Machine.
Step 1.a: Enter a name for you VBox
Enter Kali Linux 1.0.6 as the name. You’ll see Type is set to Linux automagically and version will be Linux 2.3/3.x. We will fix those later. Click Next.
Step 1.b: Allocate Memory/RAM
Default memory size is 256 MB.
Change it to 1024 (1GB).
223 comments
Really helpful, thank you !
When I click Graphical install nothing happens… Any suggestions?
hello bro… i got this message … Couldn’t retrieve dists/kali/main/binary-amd64/Packages. This may be due to a network problem or a bad CD, depending on your installation method. If you are installing from a CD-R or CD-RW, burning the CD at a lower speed may help.
Hi goku,
There’s a big post with many Kali installation errors and possible solutions here: Step failed: Installing the system or Installing step failed : Install the system at 80% or The failing step is install the system error on Kali Linux.
Read those up. Good luck,
-BMO.
Installed KL just fine using VB. However cannot enable Bluetooth adapter.
Hi Chris,
You need to unmount/disconnect BT adapter from host and then mount it on VB. I found several posts asking similar questions in VB forums. Look those up.
(In short, it’s exactly the same process as using a Wifi Adapter.) Good luck,
-BMO
After the step 5 a my VM stuck on this step
[14.760680] random: nonblocking pool is initialized
–ravi
Can you please make a tutorial about installing kali linux alongside windows 8.1.
Hi Ravi,
Can you try disabling/disconnecting unused peripherals (such as Card reader, Floppy Drive etc.) and retry install? Also double check if you’re trying to install 64bit Kali on a 32 bit Windows host or similar. Google also returned several solutions and all points to hardware issues. Check PAE/NX etc. too. Cheers,
-BMO
If you exit VBox (turn off the device) will you lose all data ?
Thank you for the exceptional tutorial, I found this very helpful in installing Kali on my machine. However, on the last step, for some reason the Guest Additions won’t install properly when I try running them from the terminal. The output I get is nearly the same as the screenshot, except I get a failed message when it attempts to start the GA(something to do with modprobe failing). Furthermore, this seems to prevent Kali from booting into full-screen when I reboot it. Would you have any suggestions?
This should help:
http://www.blackmoreops.com/2014/06/10/correct-way-install-virtualbox-guest-additions-packages-kali-linux/
blackops i am using 64 bit sony vaio laptop sve 15136cns ihad downloaded kali linux 64 bit but it shows on 32 bit not 64 bit please reply
Did you change filename by mistake? Boot it Live mode and check what’s really inside.
Hi I had the same problem, what worked for me was inatalling a previous version of virtual box. Unfortunately I can’t tell exactly which one but just try with an older one.
Thanks , it works every time !
Nice explanation which I followed closely. I am trying to load kali on a VM on Fedora. When I hit start however I get this message: Faild to open a session for the virtual machine Kali2 The virtual machine ‘Kali2’ has terminated unexpectedly during startup with exit code 1 (0x1). In a separate box I get the error “Kernel driver not installed (rc=1908) . What am I doing wrong?
Thanks
whether we should download linux first time ?
please answer
iam download kali linux 64 bit,but in virtual box just read 32 bit why ?
Thanks
Turn On Windows Virtualization and this will Fix your Problem
After Step 5.d I Get An Error That “Error Reading Release File” “The CD Rom Doesn’t Contain A Valid ‘Relaese’ File OR That File Could Be Read Only”
What Does This Error Mean.
I’m using kali-linux-1.1.0a, trying to put it in VirtualBox and after I press reboot (final step) it doesn’t ask me for a pw, it just reboots but only to say: “Oh no! Something has gone wrong. A problem has occurred and the system can’t recover. Please contact a system administrator”. Even when I turn off the machine, and change the settings like you said to enable PAE it continues to do this. How do I get around this?
Nevermind, I increased drive from 8Gb to 20Gb and it worked perfectly.
You missed “Step 2.c: Allocate disk size”. Read more carefully.
i have install kali linux 2.0 on virtual box. After completing the entire installation black screen appears and not moving further anywhere .. plz help
Ive been mucking around with Bt5r3 and Kali for 2+ years now VM’s and hard install. This was the first time i ever got VBGA’s to work and i have tried many times, even the ghastly Oracle site is no help..
IMPORTANT! when issuing the ./VBoxLinuxAdditions.run command make sure you are in the right folder. ie use cd /root. You will inevitably get a permissions error if you try and run VBoxLinuxAdditions.run from the mounted cd drive as the previous chmod command didn’t / couldn’t alter a file on a cd.,
Anyway while i was here i checked out some other tutorials and must say i have never come across a site that updates links and deprecates its own tutorials, as well as being my new number 1 source for all things hack related, THANK YOU.
I never leave comments so i really am having a gushing orgasm :)
watch my video for complete tutorial go to https://youtu.be/phZZLSym0oo
hey kali lovers the post is awesome but you can also check this awesome video for complete detailed installation guide of kali on windows. go to https://www.youtube.com/watch?v=phZZLSym0oo
Thank you Boss
Thanks a lot … tried it initially and it wasn’t installing. This post was excruciatingly detailed and that helped a lot
when i do the ./VBoxLinuxAdditions.run it show no such file or directory what it’s mean ?how solve
I’m using kali on oracle virtual box. I have added extensions compat wireless annd tried basically everything to get my wireless connections(bluetooth and wifi) running on virtual box but it just doesnt work.So basicslly can you please tell how do i get my bluetooth and wifi running on virtual box without using bluetooth or usb adapters
Hello,
I encountered the following problems:
I did not see any option to choose the graphical installation (i’m using the amd 64-mini.iso) so i’m forced to use the other “install” option available there, is that okay?
After i commence installation everything goes well until I get to a point where I’m told to choose insert a proxy address or leave blank if I not using a proxy, I notice that when I leave it blank and try to proceed I get the following error message: “An error has been detected while trying to use the following debian archive mirror. Possible reason for the error are: incorrect mirror specified; mirror is unavailable (possibly due to an unreliable network connection); mirror is broken (for example because an invalid release file was found); mirror does not support the correct debian version. Additional details may be found in var/log/syslog or on virtual console 4. Please check the specified mirror or try a different one.”
I have tried everything I think I can try, maybe I’m not doing the right thing or I’m doing the right thing the wrong way. Please educate me.
I’m using a 64 bit intel penium system. Thanks.