Hello. I just tried the following: virsh dumpxml --security-info gentoo-template > gentoo-template.xml virsh snapshot-create gentoo-template virsh undefine gentoo-template virsh blockcopy gentoo-template vda /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 --wait --verbose --finish virsh define gentoo-template.xml virsh snapshot-delete gentoo-template --current But if i restore the /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 the snapshot is gone. Someone has an idea what i'm missing? I suppose i'm just missunderstandig the snapshot mechanism. thanks an best regards t.
Kashyap Chamarthy
2013-Jun-10 07:07 UTC
Re: [libvirt-users] virsh snapshot-create and blockcopy
On 06/09/2013 02:46 PM, Thomas Stein wrote:> Hello. > > I just tried the following: > > virsh dumpxml --security-info gentoo-template > gentoo-template.xml > virsh snapshot-create gentoo-template > virsh undefine gentoo-templateWait - is that really the command you used after "snapshot-create" ? Because: You cannot undefine a guest with a snapshot without first deleting its metadata To cleanly delete, maybe you should've done: $ virsh snapshot-delete --domain gentoo-template SNAPSHOTID --metadata> virsh blockcopy gentoo-template vda > /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 --wait --verbose --finish > virsh define gentoo-template.xmlCan you also paste the output of: $ qemu-img info --backing-chain \ /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2> virsh snapshot-delete gentoo-template --current > > But if i restore the /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 the > snapshot is gone. > > Someone has an idea what i'm missing? I suppose i'm just missunderstandig the snapshot > mechanism.Here's how I used blockcopy (few months ago, slightly outdated) -- http://kashyapc.fedorapeople.org/virt/lc-2012/live-backup-with-blockcopy.txt> > thanks an best regards > t. > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >-- /kashyap
Thomas Stein
2013-Jun-10 07:50 UTC
Re: [libvirt-users] virsh snapshot-create and blockcopy
Am 10.06.13 09:07, schrieb Kashyap Chamarthy:> On 06/09/2013 02:46 PM, Thomas Stein wrote: >> Hello. >> >> I just tried the following: >> >> virsh dumpxml --security-info gentoo-template > gentoo-template.xml >> virsh snapshot-create gentoo-template >> virsh undefine gentoo-template > > Wait - is that really the command you used after "snapshot-create" ?> Because: You cannot undefine a guest with a snapshot without first deleting its metadata > > To cleanly delete, maybe you should've done: > > $ virsh snapshot-delete --domain gentoo-template SNAPSHOTID --metadataDid that. But that deletes that snapshot too, no?> >> virsh blockcopy gentoo-template vda >> /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 --wait --verbose --finish >> virsh define gentoo-template.xml > > Can you also paste the output of: > > $ qemu-img info --backing-chain \ > /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2hn ~ # qemu-img info --backing-chain /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 image: /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 file format: qcow2 virtual size: 130G (139586437120 bytes) disk size: 30G cluster_size: 65536 Just to make myself clear. I want to backup the qcow image /with/ the internal snapshot. Is that even possible with blockcopy? thanks and best regards.>> virsh snapshot-delete gentoo-template --current >> >> But if i restore the /opt/virt-backup-blockcopy/gentoo-template/gentoo-template.qcow2 the >> snapshot is gone. >> >> Someone has an idea what i'm missing? I suppose i'm just missunderstandig the snapshot >> mechanism. > > Here's how I used blockcopy (few months ago, slightly outdated) -- > http://kashyapc.fedorapeople.org/virt/lc-2012/live-backup-with-blockcopy.txt > > >> >> thanks an best regards >> t. >> >> _______________________________________________ >> libvirt-users mailing list >> libvirt-users@redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-users >> > >