virt-sparsify: command not found

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:

  • guestfish
  • virt-builder
  • virt-builder-repository
  • virt-copy-in
  • virt-copy-out
  • virt-customize
  • virt-df
  • virt-edit
  • virt-filesystems
  • virt-rescue
  • virt-sparsify
  • virt-sysprep
  • virt-v2v
  • virt-p2v

If you encounter below error:

virt-sparsify: command not found

you may try installing below package as per your choice of distribution.

Distribution Command
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.

Related Post