Chapter 16. Guest Virtual Machine Disk Access with Offline Tools

16.1. Introduction

Red Hat Enterprise Linux 6 comes with tools to access, edit and create host physical machine disks or other disk images. There are several uses for these tools, including:
  • Viewing or downloading files located on a host physical machine disk.
  • Editing or uploading files onto a host physical machine disk.
  • Reading or writing host physical machine configuration.
  • Reading or writing the Windows Registry in Windows host physical machines.
  • Preparing new disk images containing files, directories, file systems, partitions, logical volumes and other options.
  • Rescuing and repairing host physical machines that fail to boot or those that need boot configuration changes.
  • Monitoring disk usage of host physical machines.
  • Auditing compliance of host physical machines, for example to organizational security standards.
  • Deploying host physical machines by cloning and modifying templates.
  • Reading CD and DVD ISO and floppy disk images.

Warning

You must never use these tools to write to a host physical machine or disk image which is attached to a running virtual machine, not even to open such a disk image in write mode. Doing so will result in disk corruption of the guest virtual machine. The tools try to prevent you from doing this, however do not catch all cases. If there is any suspicion that a guest virtual machine might be running, it is strongly recommended that the tools not be used, or at least always use the tools in read-only mode.

Note

Some virtualization commands in Red Hat Enterprise Linux 6 allow you to specify a remote libvirt connection. For example:
virt-df -c qemu://remote/system -d Guest
However, libguestfs in Red Hat Enterprise Linux 6 cannot access remote guests, and commands using remote URLs like this do not work as expected. This affects the following Red Hat Enterprise Linux 6 commands:
  • guestfish
  • guestmount
  • virt-alignment-scan
  • virt-cat
  • virt-copy-in
  • virt-copy-out
  • virt-df
  • virt-edit
  • virt-filesystems
  • virt-inspector
  • virt-inspector2
  • virt-list-filesystems
  • virt-list-partitions
  • virt-ls
  • virt-rescue
  • virt-sysprep
  • virt-tar
  • virt-tar-in
  • virt-tar-out
  • virt-win-reg