tools for accessing and modifying virtual machine disk images


For source see the downloads directory.

In Fedora or Red Hat Enterprise Linux:

sudo yum install libguestfs-tools

On Debian/Ubuntu:

sudo apt-get install libguestfs-tools

Open a disk image:

guestfish --ro -i -a disk.img

Other distros, compiling from source ...

Mailing list and chat

Join us on the libguestfs mailing list, or on IRC channel #guestfs on Libera Chat.


Frequently Asked Questions (FAQ) and recipes page

guestfs(3) — main API documentation
guestfish(1) — interactive shell
guestmount(1) — mount guest filesystem in host
guestunmount(1) — unmount guest filesystem
virt-alignment-scan(1) — check alignment of virtual machine partitions
virt-builder(1) — quick image builder
virt-builder-repository(1) — create virt-builder repositories
virt-cat(1) — display a file
virt-copy-in(1) — copy files and directories into a VM
virt-copy-out(1) — copy files and directories out of a VM
virt-customize(1) — customize virtual machines
virt-df(1) — free space
virt-dib(1) — safe diskimage-builder
virt-diff(1) — differences
virt-edit(1) — edit a file
virt-filesystems(1) — display information about filesystems, devices, LVM
virt-format(1) — erase and make blank disks
virt-get-kernel(1) — get kernel from disk
virt-inspector(1) — inspect VM images
virt-list-filesystems(1) — list filesystems
virt-list-partitions(1) — list partitions
virt-log(1) — display log files
virt-ls(1) — list files
virt-make-fs(1) — make a filesystem
virt-p2v(1) — convert physical machine to run on KVM
virt-p2v-make-disk(1) — make P2V ISO
virt-p2v-make-kickstart(1) — make P2V kickstart
virt-rescue(1) — rescue shell
virt-resize(1) — resize virtual machines
virt-sparsify(1) — make virtual machines sparse (thin-provisioned)
virt-sysprep(1) — unconfigure a virtual machine before cloning
virt-tail(1) — follow log file
virt-tar(1) — archive and upload files
virt-tar-in(1) — archive and upload files
virt-tar-out(1) — archive and download files
virt-v2v(1) — convert guest to run on KVM
virt-win-reg(1) — export and merge Windows Registry keys
libguestfs-test-tool(1) — test libguestfs
libguestfs-make-fixed-appliance(1) — make libguestfs fixed appliance
hivex(3) — extract Windows Registry hive
hivexregedit(1) — merge and export Registry changes from regedit-format files
hivexsh(1) — Windows Registry hive shell
hivexml(1) — convert Windows Registry hive to XML
hivexget(1) — extract data from Windows Registry hive
febootstrap(8) — tool for building supermin appliances
febootstrap-supermin-helper(8) — febootstrap helper

supermin(1) — tool for building supermin appliances
supermin-helper(1) — supermin helper
guestfsd(8) — guestfs daemon

For programmers: examples in C/C++, Erlang, Golang, Java, Lua, OCaml, Perl, Python, Ruby.

For developers: README, TODO, FAQ, guestfs-building(1), guestfs-hacking(1), guestfs-internals(1), guestfs-performance(1), guestfs-release-notes(1), guestfs-security(1).

For testers: guestfs-testing(1).

Bug reports

List of bugs in libguestfs and in Fedora packaging of libguestfs

Enter a new bug report

Git repository

git clone

Latest development version: 1.53.5 (released 2024-07-08).
Stable branch: 1.52.x, 1.50.x, 1.48.x

libguestfs is a set of tools for accessing and modifying virtual machine (VM) disk images. You can use this for viewing and editing files inside guests, scripting changes to VMs, monitoring disk used/free statistics, creating guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting disks, resizing disks, and much more.

libguestfs can access almost any disk image imaginable. It can do it securely — without needing root and with multiple layers of defence against rogue disk images. It can access disk images on remote machines or on CDs/USB sticks. It can access proprietary systems like VMware and Hyper-V.

All this functionality is available through a scriptable shell called guestfish, or an interactive rescue shell virt-rescue.

libguestfs is a C library that can be linked with C and C++ management programs and has bindings for about a dozen other programming languages. Using our FUSE module you can also mount guest filesystems on the host.

The hivex subproject lets you merge changes into the Windows Registry in Windows guests. You can examine unknown disk images to find out what they contain.

libguestfs has been in continuous development since 2009, with a 250 page manual, deployed in enterprise environments, and with many happy and successful users.

Dozens of projects are using libguestfs today.

Latest blog entries

Getting started

sudo yum install libguestfs-tools      # Fedora/RHEL/CentOS
sudo apt-get install libguestfs-tools  # Debian/Ubuntu
guestfish --ro -i -a disk.img

For examples using guestfish and other tools see the recipes page. For other examples see these blog entries.

rjones AT redhat DOT com