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
img file of the disk itself, each time using a variety of disk bus options, with no luck.
Here's my process:
Create new VM in virt-manager
Import existing image
/dev/sdb for existing storage path
OS type Windows, version 8.1 (the disk has Win10)
Set mem and cpu to 50% of host
Name VM and choose Customize configuration before install, click Finish
Under Overview, change Firmware to the UEFI option, hit Apply
Under CPUs, check Copy host CPU configuration (this is a Skylake system), hit Apply
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.