scenario: you have a windows vm failing to boot with INACCESSIBLE_BOOT_DEVICE
and changing the
disk type to ide or something else causes another bsod. how to you get it to boot up again without
a physical machine?
download the stable virtio drivers from here, in iso form: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
add the iso to your qemu/virt manager config as a cd/dvd drive
windows should send you to the recovery mode screen, but if it doesn't you might have to run a windows install iso to get to it.
now open a command prompt from the recovery mode and do
loaddrv D:\viostor\w10\amd64\viostor.inf
dism /image:c:\ /add-driver /driver:d:\viostor\w10\amd64\viostor.inf
close the prompt and try to boot. if that still fails, you might need to rebuild the BCD (this happened in my case). so go back to recovery mode, open a cmd prompt and do:
loaddrv D:\viostor\w10\amd64\viostor.inf
bcdboot C:\Windows
you should be able to boot the vm now
in my case, I was converting a raw disk image from a physical install to a virtual machine, and this is what I had to do to get it to boot on qemu + ovmf
Thanks a lot for this hint – it makes sense and most of the other "hints" I found on the internet were not fixing the issue where it was caused.
Currently it's working so far that I get the following screen and after pressing F8 followed by 7 it tries to start the system. I still might have another issue to solve. Just leave that here for others.
Here you find the same tutorial a bit more in detail: https://portal.nutanix.com/page/documents/kbs/details?targetId=kA00e000000kAWeCAM