[libvirt] [PATCH 0/4] snapshot improvements

Philipp Hahn hahn at univention.de
Mon Aug 8 07:27:43 UTC 2011


Hello Eic, hello list,

On Saturday 06 August 2011 02:00:04 Eric Blake wrote:
> There's still a lot to go before virsh snapshot can manage disk
> snapshots in addition to checkpoints, but I wanted to get the
> review started on these.
>
> Even with these patches, there are some major bugs with snapshots:
> 1. Snapshots aren't storing the domain XML.  If you create a
> snapshot, then hotplug a device, then revert to the snapshot,
> then the reversion process should include hot-unplugging that
> device (qemu won't automatically do it); fixing that requires
> diffing the xml between now and the reversion point.

I posted a proof-of-concept implementation back in April 
<http://www.redhat.com/archives/libvir-list/2011-April/msg00564.html>, which 
put a copy of the domain-xml into the snapshot-xml file, so it could be 
restored.
- The patch is bit-rotting since than, but the implemetation more or less 
works with our version of libvirt-0.8.3.
- The implementation always restarts the kvm process, because 
virDomainDefCheckABIStability() wasn't available back than which I think can 
be used to decide, if the current currung kvm process is compatible with the 
to-be-restored configuration.

> 2. Restarting libvirtd forgets which snapshot is current.  When
> creating a new snapshot, it is important to remember the current
> snapshot in order to track the relationships correctly.

That's what I also noticed. Why is the parent important? As long as you use 
qemus internal snapshots, I think you don't need it. I think is important if 
you build chained snapshots and than want to delete intermediate snapshots.

> 4. Probably more issues that need thinking about...

5. Migrating a domain with snapshots looses the snapshots, because the 
receiving libvirtd doesn't get the snapshot-xml data as well. The data is 
still there, but you have to move the domain back to the original host and 
must restart libvirtd, because libvirtd only reads the snapshot-xml-data once 
on initial start; not on reload or any other event.

6. Reverting to an offline-snapshot currently does not work with qemu-0.14, 
since "qemu loadvm" doesn't call itself responsible for doing that any 
longer; see 
<http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg00650.html> for 
details.


If you (or anybody other) is working on those issues, please keep me (and the 
list) informed, so we don't do double implementation. Thanks.

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn at univention.de
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110808/bcbb643d/attachment-0001.sig>


More information about the libvir-list mailing list