libguestfs
libguestfs.org
What it is
libguestfs is a free library and toolset for working with virtual machine disk images. It can inspect and edit guest files, script changes, create or resize images, make backups, clone virtual machines and build them. The project says it can access almost any disk image, including those from VMware and Hyper-V, and images created by VMware, KVM, qemu, VirtualBox, Xen and other hypervisors; libvirt is not required. Its command-line tools include guestfish, a scriptable shell, and virt-rescue, an interactive rescue shell. The C library has bindings for many languages, with examples for C/C++, Erlang, Go, Java, Lua, OCaml, Perl, Python and Ruby. Guest filesystems are accessed through a Linux kernel in a qemu virtual machine, usually as a non-root user; sVirt with libvirt and SELinux can also be used. It runs on many Linux distributions and Mac OS X, while some virt tools have been ported to Windows. Non-Linux systems may require compiling from source and porting.
Spec sheet
- What it does
- libguestfs provides tools and a library for viewing and modifying virtual-machine disk images.Read 15 Oct 2026 · libguestfs.org
- Purpose
- libguestfs is a library and set of tools for accessing and modifying virtual machine disk images.Read 29 Sep 2026 · libguestfs.org
- Security
- It accesses guest filesystems through a Linux kernel in a qemu virtual machine, usually running as a non-root user, and can use sVirt with the libvirt backend and SELinux.Read 29 Sep 2026 · libguestfs.org
- Support
- Users can ask questions on the libguestfs mailing list or IRC channel #guestfs on Libera Chat; Red Hat Enterprise Linux customers are directed to Red Hat Support.Read 29 Sep 2026 · libguestfs.org
- Founded
- 2009Read 28 Sep 2026 · libguestfs.org
- Maker
- The GitHub repository copyright notice names Red Hat Inc.Read 29 Sep 2026 · github.com
- API scope
- The API has more than one hundred low-level filesystem access and modification calls.Read 15 Oct 2026 · libguestfs.org
- Architecture
- libguestfs launches a small QEMU appliance containing a Linux kernel, userspace tools and guestfsd, communicating with the host library over RPC.Read 15 Oct 2026 · libguestfs.org
- Build requirements
- Building from source requires QEMU at least 7.2.0, qemu-img at least 7.2.0, a kernel at least 2.6.34, supermin at least 5.1.18, a C compiler, Perl and OCaml at least 4.08.Read 15 Oct 2026 · libguestfs.org
- Command execution limitation
- Commands run inside guests have limited memory, may lack networking, work only with Linux guests and are unsafe for untrusted or malicious guests.Read 15 Oct 2026 · manpages.ubuntu.com
- Command line
- The functionality is available through guestfish, a scriptable shell, and virt-rescue, an interactive rescue shell.Read 29 Sep 2026 · libguestfs.org
- Debian architectures
- The Debian package page offers builds for amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el and s390x.Read 15 Oct 2026 · packages.debian.org
- Debian package availability
- Debian bookworm provides libguestfs0 version 1:1.48.6-2 and separate packages for tools, rescue support and language bindings.Read 15 Oct 2026 · packages.debian.org
- Debian-described capabilities
- Debian describes batch guest configuration, file editing, disk statistics, virtualization migration, partial backups, cloning and registry, UUID and hostname changes.Read 15 Oct 2026 · packages.debian.org
- Developer interfaces
- libguestfs is a C library with bindings for many programming languages, and the site provides examples for C/C++, Erlang, Go, Java, Lua, OCaml, Perl, Python, and Ruby.Read 29 Sep 2026 · libguestfs.org
- Disk image tasks
- It can view and edit guest files, script VM changes, create and resize images, perform backups, clone VMs, and build VMs.Read 29 Sep 2026 · libguestfs.org
- Documentation depth
- The homepage advertises a roughly 250-page manual, and the documentation set includes API, FAQ, recipes, performance, building, hacking, internals, testing and security manuals.Read 15 Oct 2026 · libguestfs.org
- Downloads
- The project provides source downloads and lists installation commands for Fedora, Red Hat Enterprise Linux, Debian, and Ubuntu.Read 29 Sep 2026 · libguestfs.org
- File transfer
- guestfs_download and guestfs_upload support files without content or size limits, while tar-based calls transfer multiple files.Read 15 Oct 2026 · libguestfs.org
- Filesystem coverage
- Debian lists support through Linux and QEMU for ext2/3/4, btrfs, FAT, NTFS, LVM, multiple partition schemes, qcow/qcow2 and VMDK.Read 15 Oct 2026 · packages.debian.org
- FUSE availability limitation
- Local mounting requires FUSE and libfuse support at build time, and may fail with ENOTSUP when unavailable.Read 15 Oct 2026 · manpages.ubuntu.com
- FUSE mounting
- The FUSE module can mount guest filesystems on the host.Read 15 Oct 2026 · libguestfs.org
- FUSE performance limitation
- The API manual says local FUSE mounting performs poorly and recommends ordinary libguestfs calls or streaming transfers for better performance.Read 15 Oct 2026 · manpages.ubuntu.com
- Guestfish
- guestfish is the scriptable shell interface to the libguestfs API.Read 15 Oct 2026 · libguestfs.org
- Image access
- The homepage says libguestfs can access almost any disk image, including proprietary VMware and Hyper-V images.Read 15 Oct 2026 · libguestfs.org
- Image compatibility
- The project says it can access almost any disk image, including images from VMware and Hyper-V.Read 29 Sep 2026 · libguestfs.org
- Integration
- The FAQ says libvirt is not required and libguestfs works with disk images created by VMware, KVM, qemu, VirtualBox, Xen, and other hypervisors.Read 29 Sep 2026 · libguestfs.org
- Language support
- The project describes a C library linkable from C and C++ and bindings for about a dozen other languages.Read 15 Oct 2026 · libguestfs.org
- Limit
- The FAQ says non-Linux systems require compiling from source and porting libguestfs.Read 29 Sep 2026 · libguestfs.org
- LVM support
- libguestfs exposes substantial LVM2 functionality, including logical-volume creation and volume-group removal.Read 15 Oct 2026 · libguestfs.org
- Maker company
- LinkedIn lists Red Hat as a public software-development company headquartered in Raleigh, North Carolina, with 10,001+ employees and a 1993 founding year.Read 15 Oct 2026 · linkedin.com
- Maker focus
- Red Hat describes itself as an enterprise open-source provider focused on Linux, hybrid cloud, edge and Kubernetes technologies.Read 15 Oct 2026 · linkedin.com
- Optional dependencies
- libvirt, SELinux libraries, FUSE, Python, Ruby, Java, Haskell and PHP support are listed as optional build components.Read 15 Oct 2026 · libguestfs.org
- Partitioning
- The API can read, create and modify partition tables, including MBR and GPT workflows.Read 15 Oct 2026 · libguestfs.org
- Project ownership
- The repository identifies Red Hat Inc. as copyright holder and says the library is LGPLv2+ while programs use GPLv2+.Read 15 Oct 2026 · github.com
- Remote and removable media
- Disk images can be accessed on remote machines and on CDs or USB sticks.Read 15 Oct 2026 · libguestfs.org
- Repository activity
- The public GitHub repository showed 749 stars, 204 forks, 42 issues and 13 pull requests when opened.Read 15 Oct 2026 · github.com
- Security architecture
- The security design layers an appliance kernel, a non-root QEMU process and optionally sVirt with SELinux between an untrusted filesystem and the host kernel.Read 15 Oct 2026 · libguestfs.org
- Security limitation
- The security documentation warns that inspection data can contain arbitrary bytes and that oversized configuration files can still cause denial-of-service conditions.Read 15 Oct 2026 · libguestfs.org
- Security reporting
- The security guide directs private reports to Red Hat's security procedure and allows less serious issues to be filed as bugs or sent to the mailing list.Read 29 Sep 2026 · libguestfs.org
- SELinux handling
- SELinux guests are supported, but changed files may need relabeling with guestfs_setfiles or a first-boot relabel.Read 15 Oct 2026 · libguestfs.org
- Support channels
- Bug reports go through Red Hat Bugzilla, while development discussion and help are available through the libguestfs mailing list.Read 15 Oct 2026 · libguestfs.org
- Supported systems
- The FAQ says libguestfs runs on many Linux distributions and Mac OS X, while some virt tools have been ported to Windows.Read 29 Sep 2026 · libguestfs.org
- Virt-rescue
- virt-rescue supplies an interactive rescue shell for guest images.Read 15 Oct 2026 · libguestfs.org
- VM workflows
- The project supports guest-file editing, scripted VM changes, disk statistics, guest creation, P2V, V2V, backups, cloning, building, formatting and resizing.Read 15 Oct 2026 · libguestfs.org
- Windows Registry
- The hivex subproject allows Windows Registry changes to be examined, exported and merged.Read 15 Oct 2026 · libguestfs.org
Plans and prices
Strong points and limits
Strong points
- Free open-source library and tools
- Works with images from multiple hypervisors
- Offers scriptable and interactive command-line shells
- C library has bindings for many languages
Limits
- Non-Linux systems may require source compilation and porting
- Only some virt tools have been ported to Windows
Who it suits
libguestfs suits developers and administrators who need to inspect, modify or automate work on VM disk images. Its library bindings and shell tools accommodate both application code and command-line workflows.
Verdict
libguestfs provides broad disk-image operations through a library and command-line tools, with guest filesystems handled in a qemu virtual machine. Non-Linux users should account for the stated compilation and porting requirement.
Where Specifiction places it
- Virtual Drive Software#3 of 248.7