[libvirt-users] Snapshot Error

Hey When I want to take a snapshot for a Domain by using virDomainSnapshotCreateXML. The Error as below happen: libvir: QEMU error : Requested operation is not valid: Disk '/var/lib/libvirt/images/fedora-qcow.qcow2' does not support snapshotting The snapshot Configuration is : <domainsnapshot> <description>Snapshot of OS install and updates</description> <disks> <disk name='/var/lib'> <source file='/var/lib-snapshot'/> </disk> <disk name='vdb' snapshot='no'/> </disks> </domainsnapshot> And /var/lib/libvirt/images/fedora-qcow.qcow2 is the disk for the domain (use qemu-img to create). And I had tried another Disk format (*.img), but the error still happen. how can i deal with this error?? PS:qemu version is 0.14 & libvirt version is 0.9.4. Pls help. :-(

On 9/27/11, huachao yao <yao.d.hc@gmail.com> wrote:
And /var/lib/libvirt/images/fedora-qcow.qcow2 is the disk for the domain (use qemu-img to create). And I had tried another Disk format (*.img), but the error still happen. how can i deal with this error??
Just in case, are you sure it really is a qcow2 format? Just asking because I recently discovered that image files I created with qemu-img as qcow2 appears to had been converted or created as raw instead. When I googled about this, it seems that libvirt does not check what type of disk file it is, and assumes raw unless specified. So your qcow2 and img file might actually still be .raw once libvirt gets hold of it.

On 09/26/2011 08:31 PM, huachao yao wrote:
Hey When I want to take a snapshot for a Domain by using virDomainSnapshotCreateXML. The Error as below happen:
libvir: QEMU error : Requested operation is not valid: Disk '/var/lib/libvirt/images/fedora-qcow.qcow2' does not support snapshotting
Can you also post the XML of the domain, as in 'virsh dumpxml dom'? I suspect that your xml is either omitting the driver type (making libvirt have to probe, if qemu.conf allows probing, which is a security risk), or calling out raw instead of qcow2 (as in the following example): <devices> <disk ...> <driver name='qemu' type='qcow2'/> Libvirt refuses to do system checkpoints with internal disk snapshots if a disk is not explicitly qcow2, which explains the message you are getting.
The snapshot Configuration is : <domainsnapshot> <description>Snapshot of OS install and updates</description> <disks> <disk name='/var/lib'> <source file='/var/lib-snapshot'/> </disk> <disk name='vdb' snapshot='no'/> </disks> </domainsnapshot>
This makes it look like you are trying to do a disk snapshot. Are you passing the VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY flag? If so, your error message doesn't make sense (that requests external snapshots, which don't have a restriction on a qcow2-only source). If not, it means your <disks> designation is being ignored (without the DISK_ONLY flag, you are requesting a system checkpoint, which currently uses internal disk snapshots without regards to any <disks> element).
And /var/lib/libvirt/images/fedora-qcow.qcow2 is the disk for the domain (use qemu-img to create). And I had tried another Disk format (*.img), but the error still happen. how can i deal with this error??
PS:qemu version is 0.14& libvirt version is 0.9.4. Pls help. :-(
Oh, 0.9.4 doesn't have the DISK_ONLY flag, and doesn't know how to parse <disks> in the first place. For that, you need 0.9.5 or newer. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Emmanuel Noobadmin
-
Eric Blake
-
huachao yao