{"id":9368,"date":"2020-07-13T13:15:44","date_gmt":"2020-07-13T13:15:44","guid":{"rendered":"http:\/\/aikdesigns.com\/blog\/?p=9368"},"modified":"2020-07-17T22:02:22","modified_gmt":"2020-07-17T22:02:22","slug":"how-to-boot-from-a-usb-drive-in-virtualbox","status":"publish","type":"post","link":"https:\/\/aikdesigns.com\/blog\/how-to-boot-from-a-usb-drive-in-virtualbox\/","title":{"rendered":"How To Boot From A USB Drive In Virtualbox"},"content":{"rendered":"<p>VirtualBox is one of the most popular solutions used to manage and run virtual machines. It can run boot virtual machines from USB flash drives, allowing you to boot a live Linux system or install an operating system from a bootable USB device.<\/p>\n<p>After a Virtual machine is created, VirtualBox allows it to boot from the CD-ROM, floppy disk, or hard disk by default according to <a href=\"https:\/\/www.minitool.com\/\">MiniTool <\/a>tutorial, but there is no U disk to boot. However, some people prefer to boot the VirtualBox OS from USB so that they can save space, etc.<\/p>\n<p>As this option isn\u2019t exposed in the interface and requires some digging, it may not always work perfectly. It worked fine with Ubuntu 14.04 on a Windows host, but don\u2019t be surprised if you encounter problems with some configurations.<\/p>\n<p><strong>How to Make VirtualBox Boot from USB<\/strong><\/p>\n<p>In this part, I will take Windows as an example to show you how to make VirtualBox boot from USB. Refer to the steps I listed:<\/p>\n<p><strong>Step 1:<\/strong> Make sure you have VirtualBox installed on your system. Then, connect the USB drive containing the operating system you want to boot to your computer.<\/p>\n<p><strong>Step 2:<\/strong> Press &#8220;<strong>Windows + R<\/strong>&#8221; keys, type &#8220;<strong>diskmgmt.msc<\/strong>&#8221; into the <strong>Run<\/strong> dialog, and press <strong>Enter<\/strong> to open the <strong>Disk Management<\/strong> window. In the window, note down the disk number associated with the USB drive. In the following picture, the disk number is Disk 1.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-9371\" src=\"http:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-9-300x290.png\" alt=\"\" width=\"713\" height=\"689\" srcset=\"https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-9-300x290.png 300w, https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-9.png 558w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Close any open VirtualBox windows. Then, open a Command Prompt as Administrator. Here are two ways for you:<\/p>\n<ul>\n<li><strong>On Windows 7:<\/strong> Open the <strong>Start<\/strong> menu, search for <strong>Command Prompt<\/strong>, right-click the Command Prompt shortcut, and select <strong>Run as administrator<\/strong>.<\/li>\n<li><strong>On Windows 8 or 10:<\/strong> Press <strong>Windows Key + X<\/strong> and click <strong>Command Prompt (Administrator)<\/strong>.<\/li>\n<\/ul>\n<p><strong>Step 4:<\/strong> In the Command Prompt window, type the following commands and press <strong>Enter<\/strong>.<\/p>\n<ul>\n<li><strong>cd %programfiles%\\Oracle\\VirtualBox <\/strong>(This command will navigate to the directory where the VirtualBox is located, but if you installed VirtualBox to a custom directory, the directory path in the command should be replaced accordingly).<\/li>\n<li><strong>VBoxManage internalcommands createrawvmdk -filename C:\\usb.vmdk -rawdisk \\\\.\\PhysicalDrive#<\/strong> (<strong>vmdk<\/strong> is a virtual machine disk file related to the USB device.<strong> C:\\usb.vmdk<\/strong> is the file path where you want to save the usb.vmdk file. # is the disk number you noted down before.)<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-9370\" src=\"http:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-8-300x104.png\" alt=\"\" width=\"710\" height=\"246\" srcset=\"https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-8-300x104.png 300w, https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-8.png 564w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Create a virtual machine based on the <strong>usb.vmdk<\/strong> file.<\/p>\n<ul>\n<li>Right click the VirtualBox shortcut and select <strong>Run as administrator<\/strong>. Only in this way, VirtualBox can access raw disk devices.<\/li>\n<li>Create a new virtual machine by clicking the <strong>New<\/strong> button and go through the wizard. Select the operating system on the USB drive when prompted.<\/li>\n<li>When you\u2019re asked to select a hard disk, select <strong>Use an existing virtual hard drive file<\/strong>, click the button to browse for the file, and navigate to the file path (for example, C:\\usb.vmdk) where the vmdk file is saved.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-9369\" src=\"http:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-7-300x196.png\" alt=\"\" width=\"707\" height=\"462\" srcset=\"https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-7-300x196.png 300w, https:\/\/aikdesigns.com\/blog\/wp-content\/uploads\/2020\/07\/Untitled-7.png 550w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/p>\n<p>After completing the above steps, you can boot the virtual machine and it should boot the operating system from your USB drive, just as if you were booting it on a normal computer. But when you boot VirtualBox from USB, there are some notes for you:<\/p>\n<ul>\n<li>The USB drive containing the OS image should be inserted into your computer.<\/li>\n<li>The VirtualBox should be run as an administrator.<\/li>\n<li>The USB device must be the first hard disk in your virtual machine or VirtualBox won\u2019t boot from it.<\/li>\n<\/ul>\n<p>If you\u2019re using\u00a0 VMware instead of VirtualBox, try using the <a href=\"https:\/\/www.partitionwizard.com\/resizepartition\/how-to-enlarge-hard-disk-virtual-machine.html\">Plop Boot Manger to boot from USB in VMware<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VirtualBox is one of the most popular solutions used to manage and run virtual machines&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":9372,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[],"class_list":["post-9368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/9368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=9368"}],"version-history":[{"count":0,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/9368\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/media\/9372"}],"wp:attachment":[{"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=9368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=9368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aikdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=9368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}