libguestfs is a command-line library of utilities for working with VM disks. This library consists of roughly 30 different commands, some of which are included in the following list:
If you encounter below error:
virt-sparsify: command not found
you may try installing below package as per your choice of distribution.
|Debian||apt-get install libguestfs-tools|
|Ubuntu||apt-get install libguestfs-tools|
|Kali Linux||apt-get install libguestfs-tools|
|Fedora||dnf install libguestfs-tools-c-1|
|Raspbian||apt-get install libguestfs-tools|
virt-sparsify can operate on any disk image, not just ones from virtual machines. However, if a virtual machine has multiple disks and uses volume management, then virt-sparsify will work but not be very effective.