How To Install libguestfs on AlmaLinux 8

In this tutorial we learn how to install libguestfs in AlmaLinux 8. libguestfs is Access and modify virtual machine disk images

Introduction

In this tutorial we learn how to install libguestfs on AlmaLinux 8.

What is libguestfs

Libguestfs is a library for accessing and modifying virtual machine disk images. http It can be used to make batch configuration changes to guests, get disk used/free statistics (virt-df), migrate between hypervisors (virt-p2v, virt-v2v), perform backups and guest clones, change registry/UUID/hostname info, build guests from scratch (virt-builder) and much more. Libguestfs uses Linux kernel and qemu code, and can access any type of guest filesystem that Linux and qemu can, including but not limited to schemes, qcow, qcow2, vmdk. Libguestfs for Red Hat Enterprise Linux is split into several subpackages. The basic subpackages are libguestfs C library libguestfs-tools virt-* tools, guestfish and guestmount (FUSE) libguestfs-tools-c only the subset of virt tools written in C (for reduced dependencies) virt-v2v convert virtual machines to run on KVM (V2V) virt-p2v-maker convert physical machines to run on KVM (P2V) virt-dib safe and secure diskimage-builder replacement For enhanced features, install libguestfs-gfs2 adds Global Filesystem (GFS2) support libguestfs-inspect-icons adds support for inspecting guest icons libguestfs-rescue enhances virt-rescue shell with more tools libguestfs-rsync rsync to/from guest filesystems libguestfs-xfs adds XFS support For developers libguestfs-devel C/C++ header files and library libguestfs-benchmarking Benchmarking utilities Language bindings libguestfs-gobject-devel GObject bindings and GObject Introspection libguestfs-java-devel Java bindings lua-guestfs Lua bindings ocaml-libguestfs-devel OCaml bindings perl-Sys-Guestfs Perl bindings python3-libguestfs Python 3 bindings ruby-libguestfs Ruby bindings

We can use yum or dnf to install libguestfs on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install libguestfs.

Install libguestfs on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install libguestfs using dnf by running the following command:

sudo dnf -y install libguestfs

Install libguestfs on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install libguestfs using yum by running the following command:

sudo yum -y install libguestfs

How To Uninstall libguestfs on AlmaLinux 8

To uninstall only the libguestfs package we can use the following command:

sudo dnf remove libguestfs

References

Summary

In this tutorial we learn how to install libguestfs on AlmaLinux 8 using yum and dnf.