Last Updated on April 8, 2026
Virtualization software such as VMware, Hyper-V and VirtualBox allow us to create multiple virtual machines (computers) that run on one physical computer so we can do things such as test operating systems and software or create virtual networked computers to run our business applications on. This type of technology allows us greater flexibility that if we were using only physical computers in our environments.
One procedure that is commonly used with virtualization is the installation of operating systems from ISO files and this is generally a pretty simple process and not too complicated. But sometimes we want to install operating systems or boot up with recovery software that is not in an ISO format but rather on a USB flash drive. Unfortunately, VirtualBox doesn’t have a really simple way to do this like they do for ISO files but that doesn’t mean it can’t be done.
In this tutorial we will show you the process for booting a VM from a USB flash drive so you will know how to accomplish this for when you need to perform this task for yourself. For our example we will boot up with a flash drive that has a bootable version of Windows 10 on it. If you would like to know how to create a bootable flash drive then check out our article on the free Rufus bootable flash drive utility.
Configuring Your USB Drive for VirtualBox
1. Find Your USB Disk Number
Once you have your bootable flash drive configured and connected to your computer you will need to find the disk number that goes along with that drive. The easiest way to do that is to go into Disk Management and find the USB drive and look for the disk number that goes along with it. The easiest way to get to Disk Management is to type in in the search box or in Cortana. In our case it is Disk 4 as seen in the image below.

2. Verify Rufus Settings for Windows
You need to verify your formatting settings if you plan on booting a Windows flash drive. Make sure your settings in Rufus are set to MBR for the partition scheme and BIOS for the target system if using Windows 10. You should use GPT and UEFI for the target system if you are installing Windows 11.

Creating the Virtual Disk File
1. Open an Administrative Command Prompt
The next step involves opening a command prompt as an administrator to run elevated commands. You can simply type cmd in the Windows search box to locate the correct tool. Right click on cmd.exe in the search results list and choose Run as administrator.
2. Navigate to the VirtualBox Directory
Next you will want to type the following line into the command prompt box and press enter. This command takes you directly to the default VirtualBox installation location. You will need to navigate to your custom location instead if you installed VirtualBox somewhere else.
cd %programfiles%\Oracle\VirtualBox

3. Generate the Raw VMDK File
The next critical step involves creating a virtual disk that points directly to your physical USB drive. You must specify where you want this disk created and include the exact disk number of your flash drive. We will create the virtual disk in the root of the D drive for our example. We already know it is disk number 4 from what we saw earlier in Disk Management. You can customize the destination folder to be anywhere you like on your computer. Here is what our specific command looks like when we run it.
VBoxManage internalcommands createrawvmdk -filename D:\usb.vmdk -rawdisk \.\PhysicalDrive4

4. Verify Successful Creation
You should check the command prompt output to verify the process worked properly. You will get a success message if you typed everything correctly. It should say something similar to “RAW host disk access VMDK file D:\usb.vmdk created successfully.”
Attaching the USB Drive to Your VM
1. Run VirtualBox as Administrator
Next we will open our VirtualBox Manager software to configure the new machine. You must right click the VirtualBox icon and choose Run as administrator instead of opening it normally. The software requires elevated privileges to access the raw physical USB drive.
2. Create a New Virtual Machine
Now it is time to create a new virtual machine and attach the USB drive so we can boot from it. You will go through the new VM creation process just like you would for any standard VM setup. You will want to choose the Use an existing hard virtual disk file option when it comes to the hard disk creation screen. Click the browse folder icon to open the Hard Disk Selector box.

3. Add Your Custom USB Virtual Disk
From here you will click on the Add button to locate your new file. Browse directly to the location where you saved your USB disk file from the previous command prompt step. It was in the root of the D drive for us and the file is called usb.vmdk.


4. Finish the VM Creation Process
Once you click on the Choose button you will be brought back to the Create virtual machine box. You can then click the Create button to finish the entire process. Your virtual machine is now configured to see the USB drive.

5. Add a Virtual Disk for OS Installation
Keep in mind that this configuration only lets you boot directly from your USB drive. You will need to add another virtual disk if you actually want to install an operating system. You must have something to install the OS onto. Go into that virtual machine’s settings and navigate to the Storage section. Add and create a new virtual disk just like you would do when creating a standard VM.

6. Prioritize the Boot Order
You must ensure the system attempts to boot from the USB drive first. Just make sure that the USB disk is at the very top of the list after you create your new virtual hard disk. This forces VirtualBox to load the flash drive before the empty virtual hard drive.

Troubleshooting USB Boot Errors
1. Fix I/O Cache Errors
Now when you start your computer it should boot from your USB flash drive. It will load the operating system or utility that you have configured on that flash drive. You might get an error stating the I/O cache encountered an error while updating data. Go to your storage settings and check the box that says Use Host I/O Cache for the controller to see if that fixes it.
2. Move the USB to an Existing VM
You can easily reuse this bootable configuration for other virtual machines later. Remove this USB virtual disk from your current VM and attach it to an existing VM. This allows you to boot up an existing VM from your USB flash drive for troubleshooting purposes. You can do this quickly from the storage settings on any of your VMs.






