HOME

TheInfoList



OR:

libguestfs is a C
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
and a set of tools for accessing and modifying
virtual disk image In computer science, storage virtualization is "the process of presenting a logical view of the physical storage resources to" a host computer system, "treating all storage media (hard disk, optical disk, tape, etc.) in the enterprise as a sing ...
s used in
platform virtualization In computing, virtualization (abbreviated v12n) is a series of technologies that allows dividing of physical computing resources into a series of Virtual machine, virtual machines, Operating system, operating systems, processes or containers. Vir ...
. The tools can be used for viewing and editing virtual machines (VMs) managed by
libvirt libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer o ...
and files inside VMs, scripting changes to VMs, creating VMs, and much else besides. It was created to avoid security issues that occur when virtual disk images are mounted directly on the host system. libguestfs can access nearly any type of file system including: all known types of Linux filesystem (
ext2 ext2, or second extended file system, is a file system for the Linux kernel (operating system), kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed ...
/ 3/ 4,
XFS XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; a ...
,
btrfs Btrfs (pronounced as "better F S", "butter F S", "b-tree F S", or "B.T.R.F.S.") is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (distinct from Linux's LVM), d ...
, etc.), any Windows filesystem (
VFAT File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the MS-DOS and Windows 9x operating systems. Originally developed in 1977 for use on floppy disks, it was adapted for use on h ...
and
NTFS NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s. It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
), any Mac OS X and BSD filesystems,
LVM2 In Linux, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel. Most modern Linux distributions are LVM-aware to the point of being able to have their root file systems on a log ...
volume management, MBR and GPT disk partitions, raw disks, qcow2, VirtualBox
VDI VDI may refer to: * Verein Deutscher Ingenieure, the Association of German Engineers * Vidalia Regional Airport (IATA code: VDI) * Vietnam Defence Industry, Vietnam's General Department of Defense Industry. Technology * Virtual Desktop Infrastr ...
, VMWare VMDK, Hyper-V VHD/VHDX, on files, local devices, CD and DVD ISOs, SD cards, or remotely over FTP, HTTP,
SSH The Secure Shell Protocol (SSH Protocol) is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution. SSH was designed for Un ...
,
iSCSI Internet Small Computer Systems Interface or iSCSI ( ) is an Internet Protocol-based storage networking standard for linking data storage facilities. iSCSI provides block-level access to storage devices by carrying SCSI commands over a TCP/IP ...
, NBD,
GlusterFS Gluster Inc. (formerly known as Z RESEARCH) was a software company that provided an open source platform for scale-out public and private cloud storage. The company was privately funded and headquartered in Sunnyvale, California, with an engine ...
, Ceph, Sheepdog, and much more. libguestfs does not require root permissions. The C
API An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
for libguestfs can be linked with C and
C++ C++ (, pronounced "C plus plus" and sometimes abbreviated as CPP or CXX) is a high-level, general-purpose programming language created by Danish computer scientist Bjarne Stroustrup. First released in 1985 as an extension of the C programmin ...
programs. It has official bindings for
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
,
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
,
Ruby Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
,
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
,
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
,
PHP PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. ...
,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
, Erlang,
Lua Lua is a lightweight, high-level, multi-paradigm programming language designed mainly for embedded use in applications. Lua is cross-platform software, since the interpreter of compiled bytecode is written in ANSI C, and Lua has a relatively ...
,
Golang Go is a high-level general purpose programming language that is statically typed and compiled. It is known for the simplicity of its syntax and the efficiency of development that it enables by the inclusion of a large standard library supply ...
and C#. libguestfs comes with command-line programs that allows use from shell scripts or in the command line. It has two "shells" of its own providing for interactive use, for general operations and for fixing unbootable virtual machines. Multiple tools are available modeled after ordinary
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
commands, such as and . Through the
FUSE Fuse or FUSE may refer to: Devices * Fuse (electrical), a device used in electrical systems to protect against excessive current ** Fuse (automotive), a class of fuses for vehicles * Fuse (hydraulic), a device used in hydraulic systems to protec ...
module, guest filesystems can be mounted on the host with the command. libguestfs works in part by running an appliance (a tiny Linux distribution) inside of a virtual machine. This can be achieved through either
qemu The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
or
libvirt libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer o ...
. These two can in turn use either TCG (software emulation) or KVM (hardware-accelerated).


Structure

libguestfs is only one part of the larger libguestfs project. Each of the following is a separate source code archive (tarball): * 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 On Linux, network block device (NBD) is a network protocol that can be used to forward a device node, block device (typically a hard disk or partition) from one machine to a second machine. As an example, a local machine can access a hard disk ...
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

Hivex is a C library from the authors, intended for reading and writing
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, a ...
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". https://libguestfs.org/hivex.3.html


See also

*
Kernel-based Virtual Machine Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the Kernel (operating system), kernel to function as a hypervisor. It was merged into the Mainline Linux, mainline Linux kernel i ...
(KVM) *
QEMU The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
*
libvirt libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer o ...
*
OpenStack OpenStack is a free, open standard cloud computing platform. It is mostly deployed as infrastructure-as-a-service (IaaS) in both public and private clouds where virtual servers and other resources are made available to users. The software pla ...
*


References


External links

* {{Official website, http://libguestfs.org/ Application programming interfaces Free virtualization software Virtual machines Virtualization software for Linux