{"id":4436,"date":"2017-03-14T23:06:44","date_gmt":"2017-03-14T22:06:44","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=4436"},"modified":"2017-03-15T15:12:51","modified_gmt":"2017-03-15T14:12:51","slug":"virtualbox-boot-from-usb","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/virtualbox-boot-from-usb\/","title":{"rendered":"VirtualBox: Boot from USB"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_4436 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_4436')){$('.twoclick_social_bookmarks_post_4436').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"VirtualBox%3A%20Boot%20from%20USB\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0AVirtualbox%20allows%20to%20boot%20from%20USB.%20But%20this%20feature%20isn%27t%20exposed%20to%20the%20GUI.%20%0D%0A%0D%0ALets%20start.%20First%20of%20all%20determine%20the%20physical%20disk.%20Open%20Powershell%20and%20query%20the%20disks%20by%20WMI%0D%0A%5Bpowershell%5D%0D%0APS%20D%3A%5C%26gt%3B%20Get-WmiObject%20-Query%20%26quot%3BSelect%20%2A%20from%20Win32_DiskDrive%26quot%3B%0D%0A%0D%0APartitions%20%3A%203%0D%0ADeviceID%20%20%20%3A%20%5C%5C.%5CPHYSICALDRIVE0%0D%0AModel%20%20%20%20%20%20%3A%20Samsung%20SSD%20850%20PRO%20512G%0D%0ASize%20%20%20%20%20%20%20%3A%20512105932800%0D%0ACa%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/virtualbox-boot-from-usb\\\/\",\"post_id\":4436,\"post_title_referrer_track\":\"VirtualBox%3A+Boot+from+USB\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>Virtualbox allows to boot from USB. But this feature isn&#8217;t exposed to the GUI. <\/p>\n<p>Lets start. First of all determine the physical disk. Open Powershell and query the disks by WMI<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; Get-WmiObject -Query &quot;Select * from Win32_DiskDrive&quot;\r\n\r\nPartitions : 3\r\nDeviceID   : \\\\.\\PHYSICALDRIVE0\r\nModel      : Samsung SSD 850 PRO 512G\r\nSize       : 512105932800\r\nCaption    : Samsung SSD 850 PRO 512G\r\n\r\nPartitions : 1\r\nDeviceID   : \\\\.\\PHYSICALDRIVE2\r\nModel      : Generic USB CF Reader USB Device\r\nSize       : 4030387200\r\nCaption    : Generic USB CF Reader USB Device\r\n<\/pre>\n<p><!--more--><br \/>\nThe device path to the USB device is <strong>\\\\.\\PHYSICALDRIVE2<\/strong>.<\/p>\n<p>Open a command shell cmd.exe as Administrator and navigate to the folder where VirtualBox is installed and expose the physical device as a file.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nC:\\&gt; cd \/d D:\\Programs\\VirtualBox\r\nD:\\Programs\\VirtualBox&gt; VBoxManage internalcommands createrawvmdk -filename D:\\VMs\\usb.vmdk -rawdisk \\\\.\\PHYSICALDRIVE2\r\nRAW host disk access VMDK file D:\\VMs\\usb.vmdk created successfully.\r\n<\/pre>\n<p>D:\\VMs\\usb.vmdk can now be used as a (Virtual) Disk in VirtualBox.<br \/>\n<strong>Note: <\/strong>You have to start VirtualBox with <strong>Administrator Permissions<\/strong> to access a physical device!<br \/>\nIf you want to boot from make sure it is disk 0 in your virtual machine.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\Programs\\VirtualBox&gt; VBoxManage.exe  showmediuminfo d:\\VMs\\usb.vmdk\r\nUUID:           fc60ba58-5074-45b9-a33f-62a87bf61262\r\nParent UUID:    base\r\nState:          created\r\nType:           normal (base)\r\nLocation:       d:\\VMs\\usb.vmdk\r\nStorage format: VMDK\r\nFormat variant: fixed unknown\r\nCapacity:       3847 MBytes\r\nSize on disk:   3847 MBytes\r\nEncryption:     disabled\r\n<\/pre>\n<p>If you do not use it anymore unmount the USB device. Detach it from the VM<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\Programs\\VirtualBox&gt; VBoxManage showvminfo &quot;Linux USB Test&quot;\r\n....\r\nStorage Controller Name (0):            SATA\r\n....\r\nSATA (0, 0): D:\\VMs\\usb.vmdk (UUID: 851100e0-6423-46fd-b2f6-57c246d031bd)\r\nSATA (1, 0): Empty\r\n....\r\nD:\\Programs\\VirtualBox&gt; VBoxManage storageattach &quot;D:\\Programs\\VirtualBox&gt; &quot; --storagectl SATA --port 0 --device 0  --medium none\r\nD:\\Programs\\VirtualBox&gt; VBoxManage.exe  closemedium  d:\\VMs\\usb.vmdk  --delete\r\n<\/pre>\n<p>Usage in Linux is straight forward \ud83d\ude42<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@devdeb ~ # VBoxManage internalcommands createrawvmdk -filename \/tmp\/dev.vmdk -rawdisk \/dev\/sdc\r\n....use the disk....and delete them...\r\nroot@devdeb ~ # VBoxManage closemedium --delete \/tmp\/dev.vmdk\r\n<\/pre>\n<p>Michael<\/p>\n<p>Reference: VirtualBox Documentation <a href=\"http:\/\/www.virtualbox.org\/manual\/ch09.html#rawdisk\" target=\"_blank\">9.9. Advanced storage configuration<\/a><\/p>\n<p> <a href=\"https:\/\/phonefindservice.info\">https:\/\/phonefindservice.info<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, Virtualbox allows to boot from USB. But this feature isn&#8217;t exposed to the GUI. Lets start. First of all determine the physical disk. Open Powershell and query the disks by WMI PS D:\\&gt; Get-WmiObject -Query &quot;Select * from Win32_DiskDrive&quot; Partitions : 3 DeviceID : \\\\.\\PHYSICALDRIVE0 Model : Samsung SSD 850 PRO 512G Size : &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/virtualbox-boot-from-usb\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">VirtualBox: Boot from USB<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[420],"tags":[227,987,986,984,988,284,17],"class_list":["post-4436","post","type-post","status-publish","format-standard","hentry","category-virtualboxstuff","tag-boot","tag-detach-disk-from-vm","tag-filel","tag-map","tag-physical-disk","tag-usb","tag-virtualbox"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=4436"}],"version-history":[{"count":12,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4436\/revisions"}],"predecessor-version":[{"id":4448,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4436\/revisions\/4448"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=4436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=4436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=4436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}