libguestfs is a free library and toolset for viewing and changing virtual machine disk images. It can edit guest files, script VM changes, create or resize images, make backups, clone VMs, and build them. The project says it can access almost any disk image, including those from VMware and Hyper-V, and work with images created by VMware, KVM, qemu, VirtualBox, Xen, and other hypervisors without requiring libvirt. Its image formats include raw, qcow2, vmdk, vdi, vpc, and vhd. Command-line users can work with guestfish, a scriptable shell, or virt-rescue, an interactive rescue shell. The C library has bindings for many programming 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 tools have been ported to Windows.
Who it is for
libguestfs suits developers and administrators who need to inspect or modify VM disk images, automate guest changes, or build and clone VMs. Its shell tools and language bindings support both command-line and programmatic workflows.
What is good
- Free, open-source library and tools.
- Works with images from multiple hypervisors.
- Guestfish offers a scriptable shell.
- C bindings have examples in many languages.
- Usually accesses guest files as a non-root user.
What to know first
- Non-Linux systems may require compiling and porting.
- Only some virt tools have been ported to Windows.
Verdict
libguestfs offers a broad set of disk-image tasks, shell tools, and developer interfaces at no cost. Non-Linux users should note the possible need to compile and port it.
libguestfs plans and pricing
All plansCompared on virtual drive software
- Free plan
- Yes
- Image formats
- raw, qcow2, vmdk, vdi, vpc, vhd
- Virtual disk files
- Yes
- Optical image mounting
- Yes
- Supported platforms
- Linux, Mac OS X; some virt tools have been ported to Windows

