]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: snapshot: inactive external snapshot can't work after libvirtd restart
authorShanzhi Yu <shyu@redhat.com>
Sat, 6 Dec 2014 16:32:18 +0000 (00:32 +0800)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 13 Jan 2015 20:59:06 +0000 (15:59 -0500)
commit9f974858dde667bda55fbfbec56aa16d9ced870d
treee4d831e36a19bd7c23fa54cc5945319697f9ed0a
parenta605025c2173e0d72e7c3ce5f1cd0d3a34347569
qemu: snapshot: inactive external snapshot can't work after libvirtd restart

When create inactive external snapshot, after update disk definitions,
virDomainSaveConfig is needed, if not after restart libvirtd the new snapshot
file definitions in xml will be lost.

Reproduce steps:

1. prepare a shut off guest
$ virsh domstate rhel7 && virsh domblklist rhel7
shut off

Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/rhel7.img

2. create external disk snapshot
$ virsh snapshot-create rhel7 --disk-only && virsh domblklist rhel7
Domain snapshot 1417882967 created
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/rhel7.1417882967

3. restart libvirtd then check guest source file
$ service  libvirtd restart && virsh domblklist rhel7
Redirecting to /bin/systemctl restart  libvirtd.service
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/rhel7.img

This was first reported by Eric Blake
http://www.redhat.com/archives/libvir-list/2014-December/msg00369.html

Signed-off-by: Shanzhi Yu <shyu@redhat.com>
src/qemu/qemu_driver.c