[libvirt-users] Attaching disks with external snapshots

Erlon Cruz sombrafam at gmail.com
Fri Aug 12 14:23:24 UTC 2016


Hi folks,

I'm trying to to attach a disk to an instance using libvirt. The problem
is, this disk has external snapshots. The process tried was:

1 - Attach a disk in the domain:
*        virsh# attach-device instance-00000006 /tmp/disk.xml[1] --live*

2 - Snapshot the disk[2]:
*        virsh# snapshot-create instance-00000006 --quiesce  --xmlfile
/tmp/snap-from-disk.xml[2] --disk-only*

3 - Dump the domain XML and create a new disk file from it:
        *virsh# dumpxml instance-00000006*
*        ... [3]*

4 - Dettach the device and re-add it using the new disk file:
       * virsh# detach-device instance-00000006 /tmp/disk-with-snap.xml[4]*
*        Device detached successfully*
*        virsh# attach-device instance-00000006 /tmp/disk-with-snap.xml *
*        error: Failed to attach device from /tmp/disk-with-snap.xml*
*        error: internal error: unable to execute QEMU command
'device_add': Property 'virtio-blk-device.drive' can't find value
'drive-virtio-disk1'*

Question, is this operation supported? If yes, how is the correct procedure?

Erlon


[1] http://paste.openstack.org/show/556055/
[2] http://paste.openstack.org/show/556056/
[3] http://paste.openstack.org/show/556063/
[4] http://paste.openstack.org/show/556064/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160812/291d70c5/attachment.htm>


More information about the libvirt-users mailing list