Installation guide

5.4. g uestfi sh
guestfish is a shell and command line tool for examining and modifying virtual machine disk images.
This tool uses libguestfs and exposes all functionality provided by the g uestfs API.
Warning
Using g uestfi sh on running virtual machines can cause disk-image corruption. Use the
g uestfi sh command with the --ro (read-only) option if the disk image is being used by a
running virtual machine.
Note
Refer to the Red Hat Enterprise Linux 6 Virtualization Administration Guide for more information
about g uestfi sh.
5.5. Ot her useful t ools
The following tools are used to access a guest virtual machine's disk via the host. The guest's disk is
usually accessed directly via the d i sk-i mag e file located on the host. However it is sometimes
possible to gain access via the lib virt domain. The commands that follow are part of the lib virt
domain and are used to gain access to the guest's disk image.
g uestmo unt
A command line tool used to mount virtual machine file systems and disk images on the
host machine.
Warning
Using g uestmo unt in --r/w (read/write) mode to access a disk that is currently
being used by a guest can cause the disk to become corrupted. Do not use
g uestmo unt in --r/w (read/write) mode on live virtual machines. Use the
g uestmo unt command with the --ro (read-only) option if the disk image is being
used.
vi rt-cat
A command line tool that can be used to quickly view the contents of one or more files in a
specified virtual machine's disk or disk image. This tool is installed as part of the libguestfs-
tools package.
vi rt-d f
A command line tool used to show the actual physical disk usage of virtual machines,
similar to the command line tool d f. Note that this tool does not work across remote
connections. It is installed as part of the libguestfs-tools package.
Red Hat Ent erprise Linux 6 Virt ualizat io n G et t ing St art ed G uide
28