On Fri, Mar 14, 2014 at 04:09:23PM +0500, Shumaila Naeem wrote:Not like this. This is why I said before this is "awkward in
> 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
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.imginspect-os | head -1 > /tmp/root
run
<! echo inspect-get-distro `cat /tmp/root`
EOF
----------------------------------------------------------------------
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