VMs won't boot from external snapshots on qemu 4.2

Bug #1857143 reported by Năstasie Ion Octavian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

After upgrading from qemu 4.1.1-1 to 4.2.0-1, VMs that were set to use an external snapshot as their disk failed to boot.

Depending on the guest OS and other VM settings the boot fails and you get either the "Boot failed: not a bootable drive" message or the grub rescue shell or the EFI shell. Downgrading back to qemu 4.1 allows the VMs to boot from the external snapshots without any problem and the disk images doesn't appear to be corrupted afterwards.

From my testing this bug is easily reproducible. Create a VM, install a guest os, confirm that the VM boots the guest os without problems, shutdown the VM, create an external snapshot of the VM disk, set the VM to boot from the snapshot, try to boot the VM with qemu 4.2 and see it fail, try to boot it with qemu 4.1 and see it succeed.

In my case, to test that this bug is reproducible, I used virt-manager to install Xubuntu 19.10 on a qcow2 disk image, and then used qemu-img create -f qcow2 -b base_image.qcow2 snapshot_image.qcow2 to create the external snapshot and edited the xml in virt-manager to point the VM's disk to snapshot_image.qcow2. It failed to boot with qemu 4.2, but it was working fine with 4.1.

I booted this test VM off a live distro using the virtual CDROM and fdisk can't seem to find a partition table on the VM disk when qemu 4.2 is used, with 4.1 it can see the partition table just fine.

Internal snapshots don't seem to have this problem.

I'm using Archlinux, virt-manager 2.2.1-2, libvirt 5.10.0-1, qemu 4.2.0-1.

Revision history for this message
Toolybird (toolybird) wrote :

This is due to the new way of configuring block devices in 4.2.

You'll need to create your snapshots correctly by using the '-F'
parameter of qemu-img create.

Full details here:

https://www.redhat.com/archives/libvirt-users/2019-December/msg00016.html

Revision history for this message
Năstasie Ion Octavian (noctavian) wrote :

I've rebased all my snapshots using '-F' and now everything boots properly.

Thank you.

Revision history for this message
Thomas Huth (th-huth) wrote :

Since everything now boots fine for you, I think we can close this ticket now, right? If not, feel free to open again.

Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.