Categories: How To's

How to Boot a Virtual Machine from USB in VirtualBox (Guide)

How to Boot a Virtual Machine from USB in VirtualBox (Guide)

Most of the desktop virtualization software don’t support installing a guest operating system on VirtualBox as a built-in feature yet. You may sometimes require booting a virtual machine from USB to perform this action, but you are limited by the functionality of desktop virtualization software. Even the famous VMware and VirtualBox don’t provide this functionality. This article shows how to boot a virtual machine from USB on VirtualBox with MAC OS X host, Mavericks OS and Mac Pro laptop.

For this purpose, we first need to make a VMDK file based on the attached portable flash drive and then mount the VMDK as virtual machine’s first bootable disk and then boot it. The steps to follow are presented below.

Steps to Boot a Virtual Machine in VirtualBox from USB with MAC OS X host

  • You need to attach the bootable USB disk and then locate the disk path. It will be used in commands of the MAC OS X terminal. Launch Terminal and type “mount” there.

It will display the USB disk path. Note it down since we will be using it later on.

  • Now go to the disk utility using path Go->Utilities->Disk
    Utility and then unmount the partition of USB disk. The next command will not function without unmounting the USB disk partition. You need to right-click on the USB partition and then select ‘Unmount USB name’.

  • Now, type the following command in terminal in order to create VMDK file of the USB disk.

“sudo VBoxManage internalcommands createrawvmdk -filename /Users/Dinesh/Documents/myusbdrive.vmdk -rawdisk /dev/disk2s2”

 

  • The required VMDK file will be located in /Users/Dinesh/Documents/myusbdrive.vmdk.
  • /dev/disk2s2 is the USB drive path that was obtained from the mount command earlier. Now, provide the password of super user to accomplish the task.
  • Now the VMDK file has been successfully created. Unfortunately, if you attach the file to VirtualBox and then try to boot, it will show some access denied errors. You need to modify some permissions also.
  • Since you will be using VirtualBox as normal user, but VMDK is created with a super user. Hence, you need to give read and write access to all users for a particular VMDK file. Use the following command in order to change permissions of VMDK file.

sudo chmod 777 /Users/Dinesh/Documents/myusbdrive.vmdk

  • Still, you will receive an access denied error. The permissions for USB disk also need to be modified.

sudo chmod 777 /dev/disk2s2”

  • Now, the VMDK file is ready to connect and then boot virtual machine from USB in VirtualBox on MAC OS X host. Go to storage and choose the controller. Add hard disk. Select “choose existing” and search for VMDK file that was created in earlier steps.

  • Modify the hard disk SATA port number to make it the first hard disk for the virtual machine so it will boot from it.

 

In this manner, your desired Virtual Machine will boot from USB on VirtualBox with MAC OS X Mavericks host.

 

 

Fahad Saleem

Recent Posts

How you can Build a Successful Startup Enterprises

Starting your very own business can be the best thing you ever do. However, it…

12 hours ago

How can Cryptocurrency Take care of the Global Economy?

Digital Currencies have remained in the media debates and discussions in other forums. It has…

13 hours ago

How can Cryptocurrency Save your Money?

Of late, we have seen a good surge of digital currency in the market. If…

13 hours ago

What is a Reverse Flow Smoker? And Do You Need One?

Much of the reason grilled dishes are flavorful and tastier is because of the cooking…

13 hours ago

You might be Hoping for the Best, Are you Prepared for the Worst?

Pexels Source CCO License As a business owner, it’s important to remain positive. You need…

13 hours ago

What makes a Good Health Facility – Characteristics and more

Image credit When looking for a health facility, it is essential to know what characterizes…

14 hours ago