yes you are right ..

i will use python APi's then

Thankyou so much for your time and help 

Regards
Shumaila Naeem


On Fri, Mar 14, 2014 at 4:38 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Fri, Mar 14, 2014 at 04:09:23PM +0500, Shumaila Naeem wrote:
> is there any way i can run both inspect-os and get-distro in one line
>
> something like this
> guestfish -- add /dev/null : config -set
> drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img : run :
>  inspect-get-distro inspect-os

Not like this.  This is why I said before this is "awkward in
guestfish".  TBH you're best off continuing with the Python program.
If you absolutely must use guestfish (which I don't recommend for this
case) then:

----------------------------------------------------------------------
#!/bin/bash -

guestfish <<'EOF'

add /dev/null readonly:true
# RHEL 6 hack for adding Ceph drives:
config -set drive.hd0.file=rbd:ssd-clonetest-rule5/ubuntu-12.04--1.raw.img

run

inspect-os | head -1 > /tmp/root
<! echo inspect-get-distro `cat /tmp/root`

EOF
----------------------------------------------------------------------

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v