QEMU – Windows 10 Guest State Lost After Debian Host Dist-Upgrade

libvirtqemu

I'm running a headless Debian host with a win10 guest that I seldomly login to via vnc. Last week I upgraded Debian from Buster to Bullseye, and that also upgraded QEMU from v3.1 to v5.2 (and libvirt jumped from 5.0 to 7.0). Of course, my due diligence checklist did not include making a snapshot from the guest. When I now login to the system, I'm greeted by the Windows installer.

I know my way around Debian, but am fairly new to QEMU/Libvirt – any pointers how to try and restore the state of my guest OS? Reinstalling is not that big of a deal, but we live to learn :).

This is the install command I used:

virt-install
--name Win10
--ram 2048
--cpu host
--hvm
--vcpus 2
--os-type windows
--os-variant win10
--disk /var/lib/libvirt/images/win10.qcow2,size=30,bus=virtio
--disk /var/lib/libvirt/boot/Win10_2004_English_x64.iso,device=cdrom,bus=sata
--disk /var/lib/libvirt/boot/virtio-win-0.1.171.iso,device=cdrom,bus=sata
--boot cdrom
--network bridge=br0
--graphics vnc,listen=0.0.0.0,port=5901
--noautoconsole
--check all=off

/EDIT: To clarify: I'm hoping to restore the state of my guest OS to the state it was in before the dist-upgrade. Maybe I need to rely on a filesystem backup (which I have), or maybe I need to update the qemu/libvirt configuration?

Best Answer

If I remember correctly, the boot order mechanism changed, so specifying --boot cdrom will now remove all but the CD-ROM from the list of bootable media, instead of just affecting ordering.

This might be as simple as adding a ,hd at the end there, or replacing cdrom by hd.