libguestfs
DeveloperRichard Jones
ReleaseApril 4, 2009; 17 years ago (2009-04-04)[1]
Stable release
1.58.1 / January 19, 2026; 4 months ago (2026-01-19)[2]
Written inC; utilities in OCaml Perl, et al.
Operating systemLinux
TypeVirtualization
LicenseLGPL, GPL
Websitelibguestfs.org

libguestfs is a C library and a set of tools for accessing and modifying virtual disk images used in platform virtualization. The tools can be used for viewing and editing virtual machines (VMs) managed by libvirt and files inside VMs, scripting changes to VMs, creating VMs, and much else besides.[3] It was created to avoid security issues that occur when virtual disk images are mounted directly on the host system.[4]

libguestfs can access nearly any type of file system including: all known types of Linux filesystem (ext2/3/4, XFS, btrfs, etc.), any Windows filesystem (VFAT and NTFS), any Mac OS X and BSD filesystems, LVM2 volume management, MBR and GPT disk partitions, raw disks, qcow2, VirtualBox VDI, VMWare VMDK, Hyper-V VHD/VHDX, on files, local devices, CD and DVD ISOs, SD cards, or remotely over FTP, HTTP, SSH, iSCSI, NBD, GlusterFS, Ceph, Sheepdog, and much more. libguestfs does not require root permissions.

The C API for libguestfs can be linked with C and C++ programs. It has official bindings for Perl, Python, Ruby, Rust, Java, OCaml, PHP, Haskell, Erlang, Lua, Golang and C#.[3]

libguestfs comes with command-line programs that allows use from shell scripts or in the command line.[3] It has two "shells" of its own providing for interactive use, guestfish for general operations and virt-rescue for fixing unbootable virtual machines. Multiple tools are available modeled after ordinary Unix commands, such as virt-cat and virt-tar.[5] Through the FUSE module, guest filesystems can be mounted on the host with the guestmount command.[3]

libguestfs works in part by running an appliance (a tiny Linux distribution) inside of a virtual machine.[6] This can be achieved through either QEMU or libvirt. These two can in turn use either TCG (software emulation) or KVM (hardware-accelerated).[7]

Structure

edit

libguestfs is only one part of the larger libguestfs project. Each of the following is a separate source code archive (tarball):[8]

  • libguestfs, the library.
  • guestfs-tools, the command-line programs making use of libguestfs.
  • hivex, the Windows Registry editing library (with command-line programs).
  • libnbd, userspace library providing a network block device client.
  • nbdkit, code for a network block device server.
  • supermin, tools for creating "appliances".
  • virt-p2v, tool for converting a physical machine into a KVM instance.
  • virt-v2v, tool for converting a non-KVM hypervisor instance into a KVM instance.

Some of these components (nbd-related and hivex) are created separately by libguestfs authors because they are needed for implementing some features in libguestfs, but can also be used independently of the image-handling functionality. Others are tools that build on libguestfs but go beyond its original scope.

Hivex

edit

Hivex is a C library from the authors, intended for reading and writing Windows Registry Hive files. It comes with a number of console programs for processing these files. Hivex itself does not deal with virtual machine images. For editing files in VM images, libguestfs ships a program called "virt-win-reg".[9]

See also

edit

References

edit
  1. ^ "Historical releases of libguestfs".
  2. ^ "libguestfs 1.58.1 stable".
  3. ^ a b c d "Description from home page".
  4. ^ "A reminder why you should never mount guest disk images on the host OS".
  5. ^ "Features in Fedora 12".
  6. ^ "Manual page guestfs-performance(1): engineering libguestfs for greatest performance". libguestfs.org.
  7. ^ "Manual page guestfs(3), sections "backend" and "backend settings"".
  8. ^ "Index of /". download.libguestfs.org. Retrieved 2025-09-07.
  9. ^ "hivex - Windows Registry "hive" extraction library". libguestfs.org. Retrieved 2025-09-07.
edit

📚 Artikel Terkait di Wikipedia

Kernel-based Virtual Machine

software Glauber Costa Hyper-V Kernel same-page merging (KSM) Lguest libguestfs Open Virtualization Alliance OpenNebula OpenStack Red Hat Virtualization

User-mode Linux

while in reality one physical computer is shared between many people. libguestfs has supported a UML backend since version 1.24 as an alternative to using

Libvirt

Microsoft Windows clients. Free and open-source software portal SPICE libguestfs Linux range of use § Virtualizing "0.0.1: Dec 19 2005". libvirt. 2017-06-16

Windows Registry

damaged registry entries during system boot. Richard WM Jones, author of libguestfs and hivex (tools to read and write the registry from systems other than

Fedora Linux release history

NetworkManager to manage broadband Many virtualization enhancements (KVM, libvirt, libguestfs) ext4 used even for the boot partition Moblin interface Yum-presto plugin

Comparison of disc image software

Shareware K3b Yes No No Yes Yes ISO —N/a Unix-like Free software (GPL) libguestfs Yes Yes Yes No Yes raw, qcow2, VMDK, VHD raw, qcow2, VMDK, VHD Linux Free

Open Virtualization Alliance

other virtualization solutions OVirt – web application for managing KVM libguestfs – API and its implementation for modifying virtual disk images Initially