KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

A guest file system browser based on libguestfs

There’s an experimental guest filesystem browser in alpha now available that you can use to inspect your kvm guest filesystems. If you attended the recent Red Hat summit in June 2010, you may have gotten a glimpse of this new tool in a talk given by Red Hat developer, Richard Jones. The tool is based on libguestfs project spearheaded by Richard M. Jones himself. Richard maintains his personal blog which is he updates regularly on libguestfs and other related projects.

 

 

 

Getting Started with the browser

Using the current version of the of browser is very simple. You can get started using the following guide.

 

1 Install Browser

The current version of the browser gives you two options for installation; rpm or manual build. If you’re running the latest fedora ( fedora 13 at the time of this writing ) then rpm is the obvious choice. Simply download the rpm at the following link

http://people.redhat.com/~rjones/guestfs-browser/files

and install with the following command. This example is for 64-bit linux. Use the appropriate rpm for your architecture.

rpm -Uvh guestfs-browser-0.0.3-1.fc13.x86_64.rpm

If you’re not running fedora then download the guestfs-browser-0.0.3.tar.gz file, uncompress and install as follows.

tar xvfz guestfs-browser-0.0.3.tar.gz
cd guestfs-browser-0.0.3
./configure
make
make install

 

 

2 Launch Browser

By default, the browser is installed under /usr/bin. To launch the browser simply run the following command

/usr/bin/guestfs-browser

It is recommended to start your browser with the verbose options to allow for debugging

/usr/bin/guestfs-browser --verbose

If you feel adventurous you can also start it with the --write option but make sure you know what you’re doing as this allows you modify files on your guest filesystems.

 

3 Connect to hypervisor

The first thing you need to do in order to inspect your guest filesystem is connect to a hypervisor. There is currently only one menu called “Connect” so this is the obvious starting point. Select your hypervisor using this menu.

The status bar in your browser will show the browser connecting to the hypervisor. This usually only takes a second or two. Once it’s connected you can choose a guest virtual machine to inspect.

 

4 Inspect your guest file system

Once you connect to a hypervisor there is a drop down box showing the guest(s) managed by the hypervisor you have connected to. When you initially connect, the drop down box doesn’t show a default entry which might look like there are actually no guests but this can be a bit misleading. You need to actually select the dropdown menu to see the list.

Once you select a guest, the browser actually boots your guest so you have to wait a short while for this.

Next you’ll see the filesystem layout in your browser that you can browse.

There are options to open files by right clicking on them but I haven’t been able to get this to work yet. Bear in mind that this the browser is still in alpha development.

 

Conclusion

That’s it. At the moment the tool gives you the ability to browse your guest file systems conveniently from a single window. It’s current form is a simple browser but this will no doubt go through some rapid changes at this early stage. Libguestfs is a nice set of tools opening up many possibilites for managing your guests, the first ones coming to mind being backups and configuration.

One of the other things mentioned at the recent Red Hat summit is that the browser (or something like it ) will be integrated this into virt-manager tool sometime in the future. Give it a try and post your comments on what you think about it.

See Also

Comments

I tried to compile the

I tried to compile the program on both f12 and f13 32 bit.

Ocaml complains when compiling slave.ml

Offending line
ocamlfind ocamlopt -g -warn-error A -thread -package libvirt,guestfs,lablgtk2,extlib,xml-light,threads -predicates threads -c slave.ml -o slave.cmx
File "slave.ml", line 284, characters 37-52:
Error: Unbound value G.checksums_out

Did anybody succeed ?

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.