Boot issue on imported win vm

I try to migrate a win10 vm from vmware-esx to incus but can’t get the migrated vm to boot.
What I did:

  • modified windows vm in esx to boot UEFI
  • installed virtio drivers from virtio-win-0.1.240.iso
  • on incus server:
    • qemu-img convert -p -f vmdk -O raw win10.vmdk win10.img
    • imported raw image using bin.linux.incus-migrate as vm
    • started vm incus start win10 && incus console win10 -t vga
    • vm hangs on boot with
      BdsDxe: starting Boot0001 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/Scsi(0x0,0x1)

grafik

I found Windows Images Fail to Boot #12154. Does this mean incus-migrate does not work for windows vms and I need to convert the vmdk using latest virt-v2v in fedory, supporting block-driver argument?

I managed to switch to UEFI menu and select the “UEFI QEMU QEMU HARDDISK” but then I just see the the dotted windows boot circle which freezes after 20 secs.

Try echo -cpu host | incus config set win10 raw.qemu -

when adding -cpu host I see inaccessable boot device in a blur windows error page

I tried different boot repair scenarios using prepared win iso in recovery and used bcdboot but in boot I always see inaccessable boot device

I guess I need to make myself familiar with virsh and qemu-system-x86_64

What I’ve read from others in forums is that the wrong driver may be choosen during boot and that the volume could be booted in virsh/qemu to switch the storage driver before importing into incus.

btw: since opening vga console via network takes too long to step into boot menu, is there a parameter I could set to stop in firmware boot menu?

Ok, the boot device issue makes sense, just installing the virtio drivers isn’t usually sufficient to get the virtio-scsi driver into the early boot drivers.

Can you try:

incus config device override win10 root io.bus=nvme

That will move the root disk over to the NVME bus which Windows should be able to boot from without needing extra drivers.

Maybe try incus start win10 --console=vga that will start the VGA console immediately rather than need a second command to talk to the server. This may get you in quickly enough to hit ESC during the 3s wait time.

whow - I wouldn’t have come up with that in a million years. That did the trick!
I was able to boot and and windows loaded also virtio-scsi driver. After that I could shut down the vm, remove the io.bus=nvme and windows also boots now using a virtio-scsi.

Thanks so much - problem solved.

Before I tried to do it the windows way by booting from win iso and register the drivers:

drvload G:\viostor\w10\amd64\viostor.inf
dism /image:D:\ /add-driver /driver:G:\viostor\w10\amd64\viostor.inf
bcdboot D:\Windows

but that didn’t fix the boot issue.

Solution: When converting a winvm from vmware one need to set

incus config device set win10 root io.bus=nvme

on first boot to use already available drivers and then automatically register the virtio-scsi driver. Before next boot that config can be reverted and windows runs fine using virtio-scsi