Bug 1413824 - virt-clone can't handle domains with rbd volumes
Summary: virt-clone can't handle domains with rbd volumes
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-17 04:04 UTC by Jamin W. Collins
Modified: 2020-01-26 20:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-01-26 20:19:01 UTC

Attachments (Terms of Use)

Description Jamin W. Collins 2017-01-17 04:04:21 UTC
Attemping to clone a domain that uses rbd volumes will result in incorrect changes being made.

Running the following command:

diff \
    -u \
    <(virsh dumpxml ${DOMAIN}) \
    <(virt-clone --print-xml --original ${DOMAIN} --name ${DOMAIN}-new |  tr \" \')

Strangely "virt-clone --printxml" and "virsh dumpxml" use different quoting characters.  Which is why there's a tr in the above command.

Resulted in diff output like the following:

--- /dev/fd/63  2017-01-17 03:50:17.162597841 +0000
+++ /dev/fd/62  2017-01-17 03:50:17.162597841 +0000

... removed correct changes to domain name and uuid ...

The following changes are completely incorrect:
@@ -21,13 +21,12 @@
-    <disk type='network' device='disk'>
+    <disk type='file' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <auth username='libvirt'>
         <secret type='ceph' uuid='cec0cc1a-5591-4c45-baea-6487a314b605'/>
-      <source protocol='rbd' name='vms/domain'>
-        <host name='ceph-mon-1' port='6789'/>
+      <source>
         <host name='ceph-mon-2' port='6789'/>
         <host name='ceph-mon-3' port='6789'/>

... removed correct change to MAC ...

Comment 1 Jamin W. Collins 2017-01-17 04:04:55 UTC
$ yaourt -Qo virt-clone
/usr/bin/virt-clone is owned by virt-install 1.4.0-2

Comment 2 Jamin W. Collins 2017-07-17 14:34:50 UTC
It's been a while, any update?

Comment 3 Cole Robinson 2017-07-17 14:57:33 UTC
Yes this is a known issue, virt-* still need some work to fully handle gluster/rbd/sheepdog

Comment 4 Cole Robinson 2019-06-15 18:36:54 UTC
There's been some improvements in network pool/vol handling over the past couple years. Can anyone reproduce this or a similar issue with network volumes still? If so, please attach full 'virt-clone --debug ...' or 'virt-manager --debug ...' info when reproducing.

Note You need to log in before you can comment on or make changes to this bug.