libguestfs
libguestfs.org
- Free plan
- Open source
- Windows
- macOS
- Linux
- API
- Self-hosted
What libguestfs is
libguestfs is a free library and toolset for accessing and modifying virtual machine disk images. It can view and edit guest files, script VM changes, create or resize images, perform backups, clone virtual machines, and build them. The project says it can access almost any disk image, including images associated with VMware and Hyper-V, and works with images created by VMware, KVM, qemu, VirtualBox, Xen, and other hypervisors without requiring libvirt. For command-line use, guestfish provides 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.
Who it suits
libguestfs suits administrators and developers who need to inspect or change VM disk images, automate image tasks, or build virtual machines. Its APIs and command-line tools serve both programmers and shell-based workflows.
Good to know, and what to watch
- Free library and tools for VM disk-image tasks
- Works with images from many hypervisors
- Includes scriptable and interactive rescue shells
- C library has bindings for many languages
- Usually accesses guest filesystems as a non-root user
- Non-Linux systems may require compiling and porting
- Only some virt tools have been ported to Windows
Plans
Every plan and pricelibguestfs
libguestfs open-source software
Free plan
The verdict
libguestfs offers broad disk-image operations through both tools and developer interfaces. Non-Linux users should account for the stated need to compile and port it.
What the maker publishes
- API scope
- The API has more than one hundred low-level filesystem access and modification calls. source
- Architecture
- libguestfs launches a small QEMU appliance containing a Linux kernel, userspace tools and guestfsd, communicating with the host library over RPC. source
- 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. source
- 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. source
- Command line
- The functionality is available through guestfish, a scriptable shell, and virt-rescue, an interactive rescue shell. source
- Debian architectures
- The Debian package page offers builds for amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el and s390x. source
- Debian-described capabilities
- Debian describes batch guest configuration, file editing, disk statistics, virtualization migration, partial backups, cloning and registry, UUID and hostname changes. source
- Debian package availability
- Debian bookworm provides libguestfs0 version 1:1.48.6-2 and separate packages for tools, rescue support and language bindings. source
- 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. source
- Disk image tasks
- It can view and edit guest files, script VM changes, create and resize images, perform backups, clone VMs, and build VMs. source
- 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. source
- Downloads
- The project provides source downloads and lists installation commands for Fedora, Red Hat Enterprise Linux, Debian, and Ubuntu. source
- Filesystem coverage
- Debian lists support through Linux and QEMU for ext2/3/4, btrfs, FAT, NTFS, LVM, multiple partition schemes, qcow/qcow2 and VMDK. source
- File transfer
- guestfs_download and guestfs_upload support files without content or size limits, while tar-based calls transfer multiple files. source
- Founded
- 2009 source
- FUSE availability limitation
- Local mounting requires FUSE and libfuse support at build time, and may fail with ENOTSUP when unavailable. source
- FUSE mounting
- The FUSE module can mount guest filesystems on the host. source
- FUSE performance limitation
- The API manual says local FUSE mounting performs poorly and recommends ordinary libguestfs calls or streaming transfers for better performance. source
- Guestfish
- guestfish is the scriptable shell interface to the libguestfs API. source
- Image access
- The homepage says libguestfs can access almost any disk image, including proprietary VMware and Hyper-V images. source
- Image compatibility
- The project says it can access almost any disk image, including images from VMware and Hyper-V. source
- Integration
- The FAQ says libvirt is not required and libguestfs works with disk images created by VMware, KVM, qemu, VirtualBox, Xen, and other hypervisors. source
- Language support
- The project describes a C library linkable from C and C++ and bindings for about a dozen other languages. source
- Limit
- The FAQ says non-Linux systems require compiling from source and porting libguestfs. source
Checked against the maker's pages on 15 Oct 2026.