<div dir="ltr">Hello,<div><br></div><div>I'm having a problem when trying to use virt-sysprep against vms that have rbd disk images.  When I run virt-sysprep I get the following error:</div><div><br></div><div><div>>> root@kitt:~/libguestfs-1.22.4# virt-sysprep -d server-clone-test --firstboot firstboot.sh</div>
<div>>> Examining the guest ...</div><div>>> Fatal error: exception Guestfs.Error("rbd: image name must begin with a '/'")</div></div><div><br></div><div>My Disk definition is as follows:</div>
<div><br></div><div><div>>>     <disk type='network' device='disk'></div><div>>>       <driver name='qemu'/></div><div>>>       <source protocol='rbd' name='libvirt-pool/server-clone-test'></div>
<div>>>         <host name='192.168.0.40' port='6789'/></div><div>>>         <host name='192.168.0.35' port='6789'/></div><div>>>         <host name='192.168.0.2' port='6789'/></div>
<div>>>       </source></div><div>>>       <target dev='hdb' bus='ide'/></div><div>>>       <address type='drive' controller='0' bus='0' target='0' unit='1'/></div>
<div>>>     </disk></div></div><div><br></div><div>I can resolve this error by changing the name of the libvirt-pool:</div><div><br></div><div>>>       <source protocol='rbd' name='/libvirt-pool/server-clone-test'><br>
</div><div><br></div><div>But this causes an error when attempting to boot the vm:</div><div><br></div><div><div>>> root@kitt:~/libguestfs-1.22.4# virsh start server-clone-test       </div><div>>> error: Failed to start domain server-clone-test</div>
<div>>> error: internal error: process exited while connecting to monitor: W: kvm binary is deprecated, please use qemu-system-x86_64 instead</div><div>>> char device redirected to /dev/pts/5 (label charserial0)</div>
<div>>> qemu-system-x86_64: -drive file=rbd:/libvirt-pool/server-clone-test:auth_supported=none:mon_host=192.168.0.40\:6789\;192.168.0.35\:6789\;192.168.0.2\:6789,if=none,id=drive-ide0-0-1: pool name too short</div>
<div>>> qemu-system-x86_64: -drive file=rbd:/libvirt-pool/server-clone-test:auth_supported=none:mon_host=192.168.0.40\:6789\;192.168.0.35\:6789\;192.168.0.2\:6789,if=none,id=drive-ide0-0-1: could not open disk image rbd:/libvirt-pool/server-clone-test:auth_supported=none:mon_host=192.168.0.40\:6789\;192.168.0.35\:6789\;192.168.0.2\:6789: Invalid argument</div>
</div><div><br></div><div>I'm currently using libguestfs-1.22.4 and I did run into a known bug [1] that I was able to patch, but I don't think that's related to the issues with disk naming.</div><div><br></div>
<div>Is there a way to give virt-sysprep a rbd with the -a flag, or is there a better way to sysprep vms?  I would like to avoid having to edit the vm config if possible.</div><div><br></div><div>Thanks,</div><div>Jon A</div>
<div><br></div><div>[1]  <a href="https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1243190">https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1243190</a></div></div>