When it comes to virtualization on the desktop, VMware Workstation and Oracle VM VirtualBox stand out from the rest. While Workstation is a premium software and includes all advanced options, VirtualBox is an open source virtualization software with a decent set of features.

Users who have used VirtualBox to install and test drive Windows 8 (see how to install Windows 8 on VirtualBox) must have noticed that it doesn’t support booting from USB by default. Users either need to use an ISO file or DVD as bootable media.

There might be instances where you want to install Windows on VirtualBox from bootable USB flash drive. In this guide, we are going to show you how to install Windows in VirtualBox using a USB drive as bootable media. Full Credit goes to SysProbs for the tip.

Steps to boot from USB in VirtualBox

Step 1: Start the procedure by creating your bootable USB drive. If you have one, you can skip to the next step. To create, you can follow our how to install Windows 7 and Windows 8 from USB flash drive, use Microsoft DVD/USB Tool,  or Rufus tool. Once done, we recommend you follow our test bootable USB guide to make sure that the bootable media is error free.

Step 2: Connect your bootable USB drive to your Windows 7/Windows 8 host machine. Open Disk Management by typing diskmgmt.msc in the Run dialog and then pressing Enter key.

Step 3: In Disk Management, find out your USB drive’s disk number. For instance, in the below picture, Disk 1 is my USB’s disk number.

Close Disk Management.

Step 4: Next step is to create a raw VMDK file for the USB. To do that, open Command Prompt with admin rights. You can type CMD Windows 7 Start screen search and then simultaneously press Ctrl + Shift + Enter keys. Click Yes for the UAC prompt. If you are on Windows 8, type CMD when you are in Start screen and then press Ctrl + Shift + Enter.

Step 5: In the Command Prompt, enter the following commands to navigate to the VirtualBox folder. Please note that if have installed VirtualBox in any other location you need to use appropriate commands to move to the right location.

cd \

cd “Program Files”

cd Oracle

cd VirtualBox

And then enter the following command and press enter key to execute the same.

VBoxManage internalcommands createrawvmdk –filename C:\Users\PC\Desktop\New\usb2.vmdk –rawdisk\.\PhysicalDrive1

In the above command, replace PhysicalDrive1 with your USB drive’s disk number. For instance, if your drive number is 5, type PhysicalDrive5. Also, replace the path (C:\Users\PC\Desktop\New) with a valid location to save the VMDK file.

You should see “VMDK created successfully” message.

Close the Command Prompt.

Step 6: Open VirtualBox as administrator by right-clicking on the program and then clicking Run as administrator option.

Step 7: Select the virtual machine from the list, click Settings and then click Storage. Click Add Hard Disk button, click Choose existing disk and then browse to the VMDK file that you created in Step 5.

Please note that the newly attached VMDK file should be the first hard disk to able to boot. You can move the VMDK file to the first by changing the hard disk port number on the right-hand side. You are done!

You can now start the virtual machine, it should now boot from the attached USB disk. Good luck!