<div dir="ltr"><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:Arial,sans-serif">>Use 'guestfish --', ie:<br>
<br>
>guestfish -- add /dev/null [etc]</span><span style="font-size:12pt;font-family:'Times New Roman',serif"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:'Times New Roman',serif"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:'Times New Roman',serif">i tried this method this worked for
me in case of listing partitions</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">[root@EQkvm0101 ~]#
guestfish -- add /dev/null : config -set
drive.hd0.file=rbd:ssd-clonetest-rule5/fullclone.img : run : list-partitions</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">/dev/sda1</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">/dev/sda2</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">[root@EQkvm0101 ~]#</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif"> </span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">thankyou so much for the reply </span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">Also i can't use the
newest version of libguestfs as im on a production system and i could not use
the newest version due to some limitations.</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif">Also the new version
is not available in repo.</span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:12pt;font-family:Arial,sans-serif"><br>
</span></p><div>Im getting antother problem :</div><div><br></div><div>while running these commands im getting error :</div><div><div>guestfish -- add /dev/null : config -set drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img : run : inspect-os</div>
<div>/dev/ubuntu-1204-vg/root</div><div>[root@EQkvm0101 ~]# guestfish -- add /dev/null : config -set drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img :  inspect-get-distro /dev/ubuntu-1204-vg/root</div><div>
libguestfs: error: no inspection data: call guestfs_inspect_os first</div></div><div><br></div><div>can you please help me.</div><div><br></div><div>Regards </div><div>Shumaila Naeem</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Thu, Mar 13, 2014 at 5:54 PM, Shumaila Naeem <span dir="ltr"><<a href="mailto:shum.naeem@gmail.com" target="_blank">shum.naeem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">i will test it out and will update you..<div><br></div><div>Thankyou so much for your reply </div><div><br></div><div>kind regards</div><span class="HOEnZb"><font color="#888888"><div>Shumaila Naeem</div><div>
Software Engineer , Ovex Technologies </div>
</font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 5:15 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>On Thu, Mar 13, 2014 at 03:06:17PM +0500, Shumaila Naeem wrote:<br>
> <a href="http://rwmj.wordpress.com/2013/03/12/accessing-ceph-rbd-sheepdog-etc-using-libguestfs/#comment-8806" target="_blank">http://rwmj.wordpress.com/2013/03/12/accessing-ceph-rbd-sheepdog-etc-using-libguestfs/#comment-8806</a><br>


> I came across this link and  and i was able to retrieve the rbd image.<br>
><br>
> $ guestfish<br>
> ><fs> set-attach-method appliance<br>
> ><fs> add-drive /dev/null<br>
> ><fs> config -set drive.hd0.file=rbd:pool/volume<br>
> ><fs> run<br>
>  I was able to retrieve file from rbd image using the above method.<br>
><br>
> Would you please let know how to do this in a single command line. I am<br>
> getting the following error<br>
><br>
> guestfish add /dev/null : config -set<br>
> drive.hd0.file=rbd:ssd-clonetest-rule5/fullclone.img : run : list-partitions<br>
</div>> guestfish: invalid option -- 's'<br>
> Try `guestfish -help' for more information.<br>
<br>
Use 'guestfish --', ie:<br>
<br>
guestfish -- add /dev/null [etc]<br>
<div><br>
> anything I m doing wrong here.<br>
><br>
> I am using CentOS 6.4 2.6.32-358.6.2.el6.x86_64<br>
> qemu:<br>
><br>
> qemu-kvm-0.12.1.2-2.415.el6.3ceph.x86_64<br>
> qemu-kvm-tools-0.12.1.2-2.415.el6.3ceph.x86_64<br>
><br>
> guestfs:<br>
><br>
> libguestfs-tools-c-1.20.11-2.el6.x86_64<br>
> libguestfs-tools-1.20.11-2.el6.x86_64<br>
> libguestfs-1.20.11-2.el6.x86_64<br>
> libguestfs-winsupport-1.0-7.el6.x86_64<br>
<br>
</div>However I'd definitely recommend trying newer versions of libguestfs,<br>
since they support rbd transparently.<br>
<br>
Rich.<br>
<span><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>