Installing Kali Linux on USB with VirtualBox

I like to play with VirtualBox. So in this post I will show you how to install Kali Linux on a USB disk with VirtualBox which can be run both on VirtualBox and directly bootable.


Every change you made with VirtualBox (or direct access) will be stored on USB and can be accessed with Direct Access (or VirtualBox). It is awesome to use VirtualBox when you want to work beside another OS. And also awesome when you want to boot directly from Physical Computer.

The steps are very easy:

  1. Create a virtual hard drive pointing to the USB.
  2. Install Kali in VirtualBox as usual.
  3. The disk is ready!



First of all you should download Kali Linux ISO from here. Next download and install VirtualBox from here.

Here you go. It is ready to fire!


Create a virtual hard drive

Here we are going to create a virtual disk (VMDK) that points to a physical drive. All the data is written in the physical drive and VirtualBox can directly access it.

  1. Create a terminal (or command prompt) with administrative privileges.
  2. Go to VirtualBox installation Directory
    1. If you are on Linux or MAC it is not necessary, but if you’re running Windows, you should do this step: C:\Program Files\Oracle\VirtualBox
  3. Attach your USB and find its physical driver number.
    1. On windows goto Disk Management and find the Disk Number (As an example Disk1 refers to your USB, so the number is 1)
  4. Create Virtual Drive with the following command:
    1. For Windows:<span style="font-family: Courier New;">VBoxManage internalcommands createrawvmdk -filename "C:\Users\<user_name>\VirtualBox VMs\<VM_folder_name>\<file_name>.vmdk" -rawdisk \\.\PhysicalDrive#</span>
    2. For Linux:<span style="font-family: Courier New;">VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sda</span>
    3. For Mac OS X:<span style="font-family: Courier New;">VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/disk#</span>

# sign is the disk number. Step 4 credits go to this link.


Install Kali in VirtualBox

This step is easy. You should start VirtualBox with administrative privileges. The only point is that attach created virtual disk to the new virtual machine as below:


Then start the virtual machine. It will ask to attach Kali ISO.

After attaching Kali ISO image, every thing is the default installation of Kali. Here are some screen shots from my installation:

installing-kali-1 installing-kali-3 installing-kali-4 installing-kali-5 installing-kali-6

That’s it. You may like to boot with real computer or with your VirtualBox.

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


WP to LinkedIn Auto Publish Powered By :