On 08/27/2013 08:17 PM, Skardal, Harald wrote:
All,
Using Centos 6.4 with provided libvirt:
[root@node1 ~]# rpm -q libvirt
libvirt-1.0.1-2.el6.x86_64
Assume a VM with one or more live snapshots.
In virsh the VM snapshots can be listed.
With virsh:
- Stop and undefine this VM.
If you have snapshots, then just undefining will not work. You also have to undefine the
snapshot-metadata
If you have two snapshots named snap1, snap2 for v1, you also need to do:
$ virsh snapshot-delete --domain vm1 snap1 --metadata
$ virsh snapshot-delete --domain vm1 snap2 --metadata
NOTE - The above will only delete the libvirt snapshot metadata, but leaves the content
behind.
- Then define (and start) this VM.
Snapshot XMLs are located here (assuming you haven't deleted libvirt metadata
already):
/var/lib/libvirt/qemu/snapshot/. You can define these and try?
The new VM does not have the list of snapshots.
What is your goal? A clone of a VM with its associated snapshots?
Is there a way with virsh to rebuild the metadata such that libvirt "knows"
about the snapshots in the "disk stack"?
Defining the snapshot XMLs should make that possible.
Hope the above gives you some clues.
Harald
_______________________________________________
libvirt-users mailing list
libvirt-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users
--
/kashyap