On Mon, Oct 13, 2014 at 08:11:44PM +0200, Thomas Stein wrote:
On Monday 13 October 2014 16:35:15 Thomas Stein wrote:
> Am 13.10.14 16:25, schrieb Eric Blake:
> > On 10/13/2014 03:56 AM, Thomas Stein wrote:
> >> Hello.
> >>
> >>> blockcommit vm1 vda --active --verbose --pivot
> >>
> >> That's where libvirt stops working at the moment, right?
> >>
> >> virsh # blockcommit puppet-test vda --active --verbose --pivot
> >> error: unsupported flags (0x4) in function qemuDomainBlockCommit
> >
> > Which version of libvirtd is running on the server side? You'll need at
> > least libvirt 1.2.8 to play with active commit.
>
> Ah cool. Good to know. 1.2.6 running at the moment.
Nice. It works. Just upgraded to 1.2.9.
Right, I forgot to note that you need 1.2.9.
virsh # snapshot-create-as --domain one sn1 --diskspec
vda,file=/var/lib/libvirt/images/export/sn1.qcow2 --disk-only --atomic --no-
metadata
Domain snapshot sn1 created
virsh # domblklist one
Target Source
------------------------------------------------
vda /var/lib/libvirt/images/export/sn1.qcow2
virsh # blockcommit one vda --active --verbose --pivot
Block Commit: [100 %]
Successfully pivoted
virsh # domblklist one
Target Source
------------------------------------------------
vda /opt/libvirt/ssdimages/one.qcow2
virsh #
It's a charming way to make a backup. Is there anything usefull i can
make with the snapshot i created during this procedure?
Referring to the example I noted earlier, once you commited the contents
of sn1 into base, sn1 (the snapshot) is invalidated. So, I'm afraid you
can't do anything useful with it any further.
However, you might want to explore the other mechanism libvirt provides
'virsh blockpull' which merges base images into top images - in that
case, your intermediate images won't be invalidated.
Some old notes here:
https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html
Search for 'blockpull'.
Hope that helps a bit.
--
/kashyap