<div dir="ltr">yes you are right ..<div><br></div><div>i will use python APi's then</div><div><br></div><div>Thankyou so much for your time and help </div><div><br></div><div>Regards</div><div>Shumaila Naeem</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 4: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="">On Fri, Mar 14, 2014 at 04:09:23PM +0500, Shumaila Naeem wrote:<br>
> is there any way i can run both inspect-os and get-distro in one line<br>
><br>
> something like this<br>
> guestfish -- add /dev/null : config -set<br>
> drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img : run :<br>
>  inspect-get-distro inspect-os<br>
<br>
</div>Not like this.  This is why I said before this is "awkward in<br>
guestfish".  TBH you're best off continuing with the Python program.<br>
If you absolutely must use guestfish (which I don't recommend for this<br>
case) then:<br>
<br>
----------------------------------------------------------------------<br>
#!/bin/bash -<br>
<br>
guestfish <<'EOF'<br>
<br>
add /dev/null readonly:true<br>
<div class=""># RHEL 6 hack for adding Ceph drives:<br>
</div><div class="">config -set drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img<br>
<br>
run<br>
<br>
</div>inspect-os | head -1 > /tmp/root<br>
<! echo inspect-get-distro `cat /tmp/root`<br>
<br>
EOF<br>
----------------------------------------------------------------------<br>
<div class=""><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>
</div>virt-p2v 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>
</blockquote></div><br></div>