I'm trying to create a new VM (using virt-manager) that boots from an existing block device. I want to pass through the entire device to the VM.

Apparently this is easy if you're using BIOS, but I'm using OVMF (virtual UEFI) on the guest, and nothing seems to work. Whenever I create the VM, no matter what options I choose, on the first boot after creation, the OVMF BIOS will fail to boot from the hard disk. If I change any disk-related settings, OVMF will not see the new (or newly changed) disk at all, and I'll have to recreate the VM from the ground up to try out the new settings or new virtual hardware.

Aside from the straight block devices, I've also tried passing through the individual partitions, and even a few times tried a dd'd img file of the disk itself, each time using a variety of disk bus options, with no luck.

Here's my process:

  1. Create new VM in virt-manager

  2. Import existing image

  3. /dev/sdb for existing storage path

  4. OS type Windows, version 8.1 (the disk has Win10)

  5. Set mem and cpu to 50% of host

  6. Name VM and choose Customize configuration before install, click Finish

  7. Under Overview, change Firmware to the UEFI option, hit Apply

  8. Under CPUs, check Copy host CPU configuration (this is a Skylake system), hit Apply

  9. Under Boot Options, check Enable boot menu, hit Apply

Then I click Begin installation, boot, maybe get some messages about being unable to boot from floppy followed by unable to boot from hard disks or whatever it wants to call SCSI or IDE or virtio devices, then get the EDK II shell. Type exit, choose boot devices from the menu, nothing works, bash head against wall, repeatedly. Delete VM and start over, because OVMF seems to actually see whatever disk was configured at install time.

Any suggestions?

  • As far as I know, OVMF doesn't support booting from physical hard drives. Or it could be that your drive isn't GPT formatted. Sep 17, 2016 at 8:12
  • It's definitely not GPT formatted. Ok, thanks for the info. Do you know why OVMF won't see storage added (or changed) after guest creation time? Sep 17, 2016 at 18:37
  • Wait, does OVMF require GPT formatting no matter what?? Sep 17, 2016 at 18:42
  • According to this, OVMF doens't care if you're using MBR or GPT: edk2-devel.narkive.com/6FFQtJoW/… Sep 17, 2016 at 19:47
  • Are you quite sure that the existing OS boots with UEFI, then? Sep 17, 2016 at 19:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.