Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nessenj/a11c57729c6dc0496fb73437f57d4428 to your computer and use it in GitHub Desktop.
Save nessenj/a11c57729c6dc0496fb73437f57d4428 to your computer and use it in GitHub Desktop.

scenario: you have a windows server 2019 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

drvload D:\viostor\2k19\amd64\viostor.inf
dism /image:c:\ /add-driver /driver:d:\viostor\2k19\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\2k19\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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment