Leaving the USB drive in the computer when you reboot can change the /dev/sd drive letter designation causing the raw usb.vmdk file to point to the incorrect drive so it does not boot in VirtualBox. Please note that this method will not work with all USB images, especially with multi-partitioned USB drives.Something to note here. Now start the VM and it will boot from the ISO image. iso file as an optical drive under “Storage Controller: IDE” option. Just create an ISO image from the bootable USB using “GNOME disk utility” or “dd” command as described in the following link:Īfter creating the ISO, open Virtualbox application and go to the Settings of the any VM and add (mount) this newly created. In this method, we don’t need to create vmdk file. This is another way to boot USB drive in Virtualbox. Here I am booting the USB bootable drive created with Ventoy script in Virtualbox:Ĭreate An ISO From A Bootable USB Drive In Linux Now you can be able to boot from USB in Oracle Virtualbox. Click Next to continue:Īll done! Plug your bootable USB drive and start the virtual machine: You will now see the vmdk file is selected as the virtual hard disk for the new virtual mahine. Choose “Use an existing virtual hard disk file” option and click the browse button (UP arrow button):Ĭlick “Add” button to choose the newly created vmdk file:Ĭhoose the newly created vmdk file from your local drive:Īfter adding the vmdk file, click Choose button to confirm: Now open Oracle Virtualbox application and create a new virtual machine:Įnter the name of the VM, OS type and version and click Next to continue: So it is important to remove the USB first and reboot the system. If you don’t remove your USB, the name of your drive letter may change at next boot. Now remove the USB drive and reboot your system to take effect the changes. Please be mindful that adding a user to “disk” group is dangerous and security risk. Next, add your user to “vboxusers” and “disk” groups using the following commands: $ sudo usermod -a -G vboxusers sk Set proper permission to the newly created vmdk file: $ sudo chown $USER:$USER ~/usb.vmdk Upon successful vmdk file creation, you will see an output like below: RAW host disk access VMDK file /home/sk/usb.vmdk created successfully. The above command will create a new vmdk file named “usb.vmdk” in your $HOME directory. In that case, use the following command to vmdk file: $ sudo VBoxManage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdc In some Linux distros, the vboxmanage command is case-sensitive. Now, open your Terminal and run any one of the following commands to create a vmdk file: $ sudo vboxmanage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdc I/O size (minimum/optimal): 512 bytes / 512 bytesĪs you can see, my USB drive name is /dev/sdc. Sector size (logical/physical): 512 bytes / 512 bytes I am going to use “fdisk” command to find my USB drive details: $ sudo fdisk -lĭisk /dev/sdc: 14.54 GiB, 15597568000 bytes, 30464000 sectors Refer the following guide to learn different ways to find disk drive details in Linux. For those wondering, a vmdk file is nothing but a virtual disk file which contains all the information of a virtual machine.įirst, you need to find your USB drive name. vmdk file and point it to your USB drive for booting to it. To allow Virtualbox boot from USB drives, you need to create a. Boot From USB Drive In Virtualbox In Linux Luckily, I have found a simple workaround to allow Virtualbox to boot from an USB flash drive. As you might know, Oracle Virtualbox doesn’t offer any direct way to boot from USB. I thought it would be better If I could boot from USB drive in Virtualbox in my Linux system. Since I had no additional system, It seemed a little bit time consuming task to me. But the problem is I had to reboot my system every time after adding a new ISO to check if the USB drive is really working. After successfully created the bootable drive, I added different ISOs to the bootable drive. Yesterday I was trying to create multiboot USB drive with Ventoy in my Linux system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |