<div dir="ltr">Hello Richard,<div><br></div><div>I'm using:</div><div><br></div><div>>> virt-sysprep 1.25.6</div><div><br></div><div>I honestly don't remember if the currently installed version is from the tarball or pulled from the github source... Now that you mention it, I think it could even be the version with my "hack" to fix virt-sysprep...</div>
<div><br></div><div>Which version are you building? I see there's a:</div><div><br></div><div>>> <a href="http://libguestfs.org/download/1.25-development/libguestfs-1.25.11.tar.gz">libguestfs-1.25.11.tar.gz</a><span style="color:rgb(0,0,0)"> 23-Nov-2013</span></div>
<div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Would you recommend building that or building from the git repository?</span></div><div><span style="color:rgb(0,0,0)"><br></span></div>
<div><font color="#000000">Thanks,</font></div><div><font color="#000000">Jon A</font></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 3:38 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Nov 25, 2013 at 09:58:50PM +0000, Richard W.M. Jones wrote:<br>
> On Mon, Nov 25, 2013 at 12:52:21PM -0700, Jon wrote:<br>
> > Hello,<br>
> ><br>
> > I'm having trouble connecting to rbd images. It seems like somewhere the<br>
> > name is getting chewed up. I wonder if this is related to my previous<br>
> > troubles [1] [2] with rbd images.<br>
> ><br>
> > I'm trying to add an rbd image, but when I launch the guestfs object I get<br>
> > an error:<br>
> ><br>
> > >> libguestfs: trace: launch = -1 (error)<br>
> ><br>
> > I'm adding a single RBD<br>
> > >> libguestfs: trace: add_drive "libvirt-pool/build_vm_test-os"<br>
> > "format:raw" "protocol:rbd" "server:<a href="http://192.168.0.35:6789" target="_blank">192.168.0.35:6789</a> <a href="http://192.168.0.2:6789" target="_blank">192.168.0.2:6789</a><br>
> > <a href="http://192.168.0.40:6789" target="_blank">192.168.0.40:6789</a>"<br>
> ><br>
> > But it seems like the name is getting chewed up in the call to kvm:<br>
> ><br>
> > >> -drive<br>
> > file=rbd:libvirt:mon_host=192.168.0.35\:6789\;192.168.0.2\:6789\;192.168.0.40\:6789:auth_supported=none,cache=writeback,format=raw,id=hd0,if=none<br>
> > >> disk image<br>
> > rbd:libvirt:mon_host=192.168.0.35\:6789\;192.168.0.2\:6789\;192.168.0.40\:6789:auth_supported=none:<br>
> > Invalid argument<br>
> ><br>
> > I am able to add non rbd images without an issue.<br>
> ><br>
> > Any thoughts?<br>
><br>
> As a general comment, there should be no difference between the API<br>
> from C and the API from Perl. Of course, occasionally we introduce<br>
> Perl-specific bugs in the bindings, but these are rarer than you would<br>
> think (the Perl bindings are automatically generated, so any bugs<br>
> would be systematic, affecting many different calls at once).<br>
><br>
> [...]<br>
> > [1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1026688" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1026688</a><br>
> > [2] <a href="https://www.redhat.com/archives/libguestfs/2013-November/msg00003.html" target="_blank">https://www.redhat.com/archives/libguestfs/2013-November/msg00003.html</a><br>
> ><br>
> > Full Debug Output:<br>
> ><br>
> > libguestfs: trace: set_verbose true<br>
> > libguestfs: trace: set_verbose = 0<br>
> > libguestfs: create: flags = 0, handle = 0x2e74d90, program = perl<br>
> > libguestfs: trace: set_trace true<br>
> > libguestfs: trace: set_trace = 0<br>
> > libguestfs: trace: add_drive "libvirt-pool/build_vm_test-os" "format:raw"<br>
> > "protocol:rbd" "server:<a href="http://192.168.0.35:6789" target="_blank">192.168.0.35:6789</a> <a href="http://192.168.0.2:6789" target="_blank">192.168.0.2:6789</a> <a href="http://192.168.0.40:6789" target="_blank">192.168.0.40:6789</a>"<br>
> > libguestfs: trace: add_drive = 0<br>
> > libguestfs: trace: launch<br>
> > libguestfs: trace: get_tmpdir<br>
> > libguestfs: trace: get_tmpdir = "/tmp"<br>
> > libguestfs: trace: get_backend<br>
> > libguestfs: trace: get_backend = "direct"<br>
> [...]<br>
> > -drive<br>
> > file=rbd:libvirt:mon_host=192.168.0.35\:6789\;192.168.0.2\:6789\;192.168.0.40\:6789:auth_supported=none,cache=writeback,format=raw,id=hd0,if=none<br>
><br>
> In this case the export name is getting truncated ...<br>
><br>
> With the direct backend, the following code is responsible for<br>
> constructing the -drive parameter:<br>
><br>
> <a href="https://github.com/libguestfs/libguestfs/blob/master/src/drives.c#L1307" target="_blank">https://github.com/libguestfs/libguestfs/blob/master/src/drives.c#L1307</a><br>
><br>
> There seems to be something pretty strange going on with the<br>
> u.exportname field. I can't quite understand it at the moment, but it<br>
> is certainly a bug.<br>
<br>
</div></div>BTW I am unable to reproduce this with upstream libguestfs. Which<br>
version are you using?<br>
<div class="HOEnZb"><div class="h5"><br>
Rich.<br>
<br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
libguestfs lets you edit virtual machines. Supports shell scripting,<br>
bindings from many languages. <a href="http://libguestfs.org" target="_blank">http://libguestfs.org</a><br>
</div></div></blockquote></div><br></div>