[virt-tools-list] guestfish question

Richard W.M. Jones rjones at redhat.com
Thu Nov 4 19:12:00 UTC 2010


On Thu, Nov 04, 2010 at 11:55:28AM -0400, Kenneth Armstrong wrote:
> However, I exported another RHEL guest that has 2 disks for it.  One
> is /dev/VolGroup00-LogVol00 which holds my / partition, and the other
> is /dev/VolGroup01-LogVol00 which holds my /var partition.
> 
> When I run the following command on one of the disks, I get the
> following output (the GUID is the garbage that RHEV spits out, I've
> got a script that cleans that up):
> 
> guestfish -a b1c98582-d325-42e5-9d03-f798571d35fa -i inspect-os
> libguestfs: error: mount_options: mount_options_stub:
> /dev/VolGroup01/LogVol00: No such file or directory
> 
> guestfish -a 82c85a78-04c2-4918-99dc-86129bd2da39 -i inspect-os
> guestfish: no operating system was found on this disk
> 
> 
> Now the first one, I can kind of understand since it's only supposed
> to be my /var partition, and no other operating system files are on
> there, so I get that there is no operating system information in the
> output.  But on the other disk image, which is my root partition, it
> doesn't find the OS.  Any thoughts as to why?  It only does this on my
> multiple disk VM's.

So I guessed (you didn't say precisely) that these two disks belong to
the same operating system?

It seems as if b1c9... contains VolGroup00 and hence the root
partition.  libguestfs finds this, looks at /etc/fstab, and expects to
be able to mount VolGroup01/LogVol00 (which will be mentioned in
/etc/fstab), but since you didn't supply this disk to guestfish, it is
not able to do the mount and fails.

It seems as if 82c8... contains the VolGroup01.  This is just the /var
partition, so there is no operating system.

Basically, if a guest has two disks, you have to supply both of them
if you want to use the guestfish -i option.  Try:

  guestfish -a b1c9... -a 82c8... -i inspect-os

Alternately you could _not_ use the -i option, and do the inspection
manually, with or without the help of the inspection APIs:

  http://libguestfs.org/guestfs.3.html#inspection

This is a bit tricky to do from guestfish, but if you use the
underlying API from another language like Perl/Python/whatever then as
they say anything is possible ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




More information about the virt-tools-list mailing list