]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: detect when qemu lacks disk-snapshot support
authorEric Blake <eblake@redhat.com>
Tue, 18 Oct 2011 21:28:47 +0000 (15:28 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 18 Oct 2011 22:03:42 +0000 (16:03 -0600)
commitdad15a2e0213d3cd7b611632ccba77b165083b32
tree1ff2638779652f5e2ff9679cd7283e6b58495536
parent94f776e71673c9666b883f2a93b152a66057aa80
snapshot: detect when qemu lacks disk-snapshot support

Noticed when testing new libvirt against old qemu that lacked the
snapshot_blkdev HMP command.  Libvirt was mistakenly treating the
command as successful, and re-writing the domain XML to use the
just-created 0-byte file, rendering the domain broken on restart.

* src/qemu/qemu_monitor_text.c (qemuMonitorTextDiskSnapshot):
Notice another possible error message.
* src/qemu/qemu_driver.c
(qemuDomainSnapshotCreateSingleDiskActive): Don't keep 0-byte file
on failure.
src/qemu/qemu_driver.c
src/qemu/qemu_monitor_text.c