<div dir="ltr"><div><div><div><div>Hello Richard,<br><br>Thanks for the reply.<br><br></div>Indeed this behaviour exists in 1.25.6.  <br><br></div>Grepping through the source [1], there are a number of files in "./po/*.po[t]?" that contain this message, but I think it's ./src/drives.c where the fail condition is actually detected / set.<br>
<br></div>On line 300 there is an if statement that checks the first character is a slash: <br><br>  if (exportname[0] != '/') {<br>    error (g, _("rbd: image name must begin with a '/'"));<br>    return NULL;<br>
  }<br><br><br></div>I tried to comment this out and recompile guestfs, but I get an error:<br><br>make[2]: Entering directory `/root/libguestfs-1.25.6/builder'<br>ocamlfind ocamlopt -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c <a href="http://builder.ml">builder.ml</a> -o builder.cmx<br>
File "<a href="http://builder.ml">builder.ml</a>", line 53, characters 4-14:<br>Error: Unbound value List.iteri<br>make[2]: *** [builder.cmx] Error 2<br>make[2]: Leaving directory `/root/libguestfs-1.25.6/builder'<br>
make[1]: *** [all-recursive] Error 1<br>make[1]: Leaving directory `/root/libguestfs-1.25.6'<br>make: *** [all] Error 2<br><br><div class="gmail_extra">Can you provide some assistance resolving this compile error please?  Is there perhaps a better place to pull the source from?<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra">Jon A<br></div><div class="gmail_extra"><br>[1]  <a href="http://libguestfs.org/download/1.25-development/libguestfs-1.25.6.tar.gz">http://libguestfs.org/download/1.25-development/libguestfs-1.25.6.tar.gz</a><br>
<br><div class="gmail_quote">On Tue, Nov 5, 2013 at 2:01 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">On Mon, Nov 04, 2013 at 06:35:42PM -0700, Jon wrote:<br>
> Hello,<br>
><br>
> I'm having a problem when trying to use virt-sysprep against vms that have<br>
> rbd disk images.  When I run virt-sysprep I get the following error:<br>
><br>
> >> root@kitt:~/libguestfs-1.22.4# virt-sysprep -d server-clone-test<br>
> --firstboot firstboot.sh<br>
> >> Examining the guest ...<br>
> >> Fatal error: exception Guestfs.Error("rbd: image name must begin with a<br>
> '/'")<br>
><br>
> My Disk definition is as follows:<br>
><br>
> >>     <disk type='network' device='disk'><br>
> >>       <driver name='qemu'/><br>
> >>       <source protocol='rbd' name='libvirt-pool/server-clone-test'><br>
> >>         <host name='192.168.0.40' port='6789'/><br>
> >>         <host name='192.168.0.35' port='6789'/><br>
> >>         <host name='192.168.0.2' port='6789'/><br>
> >>       </source><br>
> >>       <target dev='hdb' bus='ide'/><br>
> >>       <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>
> >>     </disk><br>
><br>
> I can resolve this error by changing the name of the libvirt-pool:<br>
><br>
> >>       <source protocol='rbd' name='/libvirt-pool/server-clone-test'><br>
><br>
> But this causes an error when attempting to boot the vm:<br>
><br>
> >> root@kitt:~/libguestfs-1.22.4# virsh start server-clone-test<br>
> >> error: Failed to start domain server-clone-test<br>
> >> error: internal error: process exited while connecting to monitor: W:<br>
> kvm binary is deprecated, please use qemu-system-x86_64 instead<br>
> >> char device redirected to /dev/pts/5 (label charserial0)<br>
> >> qemu-system-x86_64: -drive<br>
> 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:<br>
> pool name too short<br>
> >> qemu-system-x86_64: -drive<br>
> 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:<br>
> could not open disk image<br>
> 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:<br>
> Invalid argument<br>
><br>
> I'm currently using libguestfs-1.22.4 and I did run into a known bug [1]<br>
> that I was able to patch, but I don't think that's related to the issues<br>
> with disk naming.<br>
><br>
> Is there a way to give virt-sysprep a rbd with the -a flag, or is there a<br>
> better way to sysprep vms?  I would like to avoid having to edit the vm<br>
> config if possible.<br>
<br>
</div></div>This is a bug basically.  I have filed a bug report here:<br>
<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1026688" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1026688</a><br>
<br>
It would be helpful to try with a newer version of libguestfs.  Ubuntu<br>
has just pushed the 1.24.0 package.  I don't know if it'll help or<br>
not, but it would be useful to know if the behaviour changes.<br>
<br>
<a href="https://launchpad.net/ubuntu/+source/libguestfs/1:1.24.0-0ubuntu1/+build/5181109" target="_blank">https://launchpad.net/ubuntu/+source/libguestfs/1:1.24.0-0ubuntu1/+build/5181109</a><br>
<br>
Rich.<br>
<span class=""><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones
virt-p2v" target="_blank">http://people.redhat.com/~rjones<br>
virt-p2v</a> converts physical machines to virtual machines.  Boot with a<br>
live CD or over the network (PXE) and turn machines into KVM guests.<br>
<a href="http://libguestfs.org/virt-v2v" target="_blank">http://libguestfs.org/virt-v2v</a><br>
</font></span></blockquote></div><br></div></div>