Red Hat Bugzilla – Bug 727709
Cannot take snapshots with virsh snapshot-create: The command savevm has not been found
Last modified: 2012-06-06 20:48:54 EDT
Description of problem:
Running virsh snapshot-create <domain> fails
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install virtual machine (Windows 2008R2 in this case) with qcow2 disk
2. Start the VM
3. sudo virsh snapshot-create Win2008R2-5
4. sudo virsh snapshot-list Win2008R2-5
sudo virsh snapshot-create Win2008R2-5
error: internal error unable to execute QEMU command 'savevm': The command savevm has not been found
[abartlet@obed samba-1]$ sudo virsh snapshot-list Win2008R2-5
Name Creation Time State
1312291332 2011-08-02 23:22:12 +1000 shutoff
1312328890 2011-08-03 09:48:10 +1000 nostate
The creation of a running snapshot
This did work in Fedora 14. It fails for all the VMs I've tried.
This snapshot mechanism was being used to support Samba development via Wintest:
I think this is a result of libvirt communicating with qemu via the new json interface, the savevm command -is- present in qemu, just not through json.
Ouch - libvirt should have detected the monitor failure, rather than proceeding to create a bogus metadata entry. I'll take a further look into this today.
BTW - it looks like there is a work-around in the libvirtd package in rawhide, it falls back to the previous way of communicating with QEMU instead of the JSON stuff.
Think that individual change could be back ported to F15?
There's two bugs here:
1. libvirt not attempting qmp->hmp fallback with qemu that doesn't support qmp savevm (upstream commit 89241fe0, v0.9.0, although several other related commits would also have to be backported; at least: 266265a, 89241fe, ce81bc5, abdfca0, 24c56ce, c33ac2e, 0ecfa7f)
2. On savevm failure, libvirt leaks bogus metadata into snapshot lists even when snapshot creation fails (just posted the upstream fix for that):
F15 (at libvirt 0.8.8) is affected by both problems; F16 is immune to the first, and the second is less likely to hit. I'm not sure if F14 also has an issue.
If you are impatient, you can use the virt-preview repo to pick up the libvirt build from F16 compiled for F15, which will solve the first bug, and probably get you to the point of not tickling the second bug.
And there's lots more active work going on for snapshots for upstream 0.9.5, you could always help test libvirt.git.
I've checked F14; this is a regression (F14 at 0.8.3 predated the switch to use qmp by default, so it was using snapshots on hmp), so it is definitely a candidate for fixing for F15.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This bug also present on el6.
Given that F15 is end of life very soon, and the number of backports we would probably need as mentioned in Comment #4, I think this is WONTFIX for F15. If anyone can still reproduce on later Fedora, please reopen and we can go from there.