virt-sparsify(1) Virtualization Support virt-sparsify(1) (NAME) virt-sparsify - (SYNOPSIS) virt-sparsify [--options] indisk outdisk virt-sparsify [--options] --in-place disk (WARNING) "virt-sparsify" . . (DESCRIPTION) virt-sparsify ( ) ( thin-provisioned) . . virt-sparsify ( ext2/3/4 btrfs NTFS ) LVM . virt-sparsify (raw) qcow2 (thin-provisioned). virt-sparsify . (volume management) virt-sparsify (http://bugzilla.redhat.com/887826). (IMPORTANT NOTE ABOUT SPARSE OUTPUT IMAGES) (raw) (raw sparse) . "du -sh". : $ ls -lh test1.img -rw-rw-r--. 1 rjones rjones 100M Aug 8 08:08 test1.img $ du -sh test1.img 3.6M test1.img ( 100M 3.6M ) (IMPORTANT LIMITATIONS) o . o virt-sparsify ( + ). . --in-place . o virt-sparsify . virt-resize(1) . o virt-sparsify . Libguestfs . o virt-sparsify . . o (copy mode) qcow2 . virt-filesystems(1) virt-df(1) . (EXAMPLES) : virt-sparsify indisk outdisk "indisk" "outdisk" . "outdisk" . ( qcow2) . --convert : virt-sparsify disk.raw --convert qcow2 disk.qcow2 virt-sparsify . ( ): virt-sparsify --ignore /dev/sda1 indisk outdisk virt-filesystems(1) . 1.26 virt-sparsify : virt-sparsify --in-place disk.img (OPTIONS) --help . --check-tmpdir ignore --check-tmpdir continue --check-tmpdir warn --check-tmpdir fail "TMPDIR" --tmp . . : o (ignore) o (continue) o (warn) Return ( ) : o (fail). --in-place . --colors --colours ANSI . tty . ANSI . --compress . "qcow2" . --in-place . --convert raw --convert qcow2 --convert [other formats] "output-format" . . : "raw" "qcow2" "vdi". qemu-img(1) "vmdk" qemu . --convert virt-sparsify . : --compress -o. --in-place . --echo-keys virt-sparsify (echo) . (Tempest) . --format raw --format qcow2 . . (raw) . --ignore filesystem --ignore volgroup . --in-place : . --in-place . (volume group) . /dev/ --ignore vg_foo . --in-place (in-place) . " (IN-PLACE SPARSIFICATION)" . --key SELECTOR LUKS (inspection) LUKS . --key NAME:key:KEY_STRING --key UUID:key:KEY_STRING --key all:key:KEY_STRING "NAME" libguestfs ( "/dev/sda1"). "UUID" (UUID) . "all" . "KEY_STRING" . --key NAME:file:FILENAME --key UUID:file:FILENAME --key all:file:FILENAME FILENAME . --key NAME:clevis --key UUID:clevis --key all:clevis Clevis . (NBDE) "ENCRYPTED DISKS" guestfs(3) . QEMU libguestfs . --keys-from-stdin (stdin) . /dev/tty . . --machine-readable --machine-readable=format (GUI) . " (MACHINE READABLE OUTPUT)" . -o option[,option,...] () -o qemu-img(1) . ( --convert ) qemu-img . -o . : virt-sparsify --convert qcow2 \ -o cluster_size=512,preallocation=metadata ... --in-place . -q --quiet . --tmp block_device --tmp dir (temporary overlay) ( "TMPDIR" ). (block device) . . "TMPDIR" . --in-place . --tmp prebuilt:file --tmp prebuilt:file ( "prebuilt:" ) virt-sparsify "file" qcow2 . o qcow2 indisk (backing file) . o virt-sparsify . o virt-sparsify . oVirt . -v --verbose . -V --version . --wrap . tty . . -x (tracing) (API) libguestfs. --zero partition --zero logvol (logical volume) . ! . (IN-PLACE SPARSIFICATION) 1.26 virt-sparsify ( ) . . : virt-sparsify --in-place disk.img : --convert --compress -o --check-tmpdir . discard ( trim unmap) . (MACHINE READABLE OUTPUT) --machine-readable virt-sparsify (GUI) . . virt-sparsify . : $ virt-sparsify --machine-readable virt-sparsify ntfs btrfs 0 . . : 1. (regex) (stdout) : ^[0-9]+/[0-9]+$ 2. stdout ( ) . / . 3. stderr . virt-sparsify . virt-sparsify --machine-readable . "ADVANCED MACHINE READABLE OUTPUT" guestfs(3) . (WINDOWS 8) << >> (fast startup) virt-sparsify . "WINDOWS HIBERNATION AND WINDOWS 8 FAST STARTUP" guestfs(3) . (ENVIRONMENT VARIABLES) TMPDIR (temporary overlay) . 1.28 virt-sparsify --tmp . ( ) $TMPDIR . /tmp . $TMPDIR tmpfs ( /tmp tmpfs "TMPDIR=/dev/shm" ) tmpfs . virt-sparsify (hang) . tmpfs : mount -o remount,size=10G /tmp --in-place . "ENVIRONMENT VARIABLES" guestfs(3) . (EXIT STATUS) 0 . ( .) . 3 --in-place discard libguestfs . (SEE ALSO) virt-df(1), virt-filesystems(1), virt-resize(1), virt-rescue(1), guestfs(3), guestfish(1), truncate(1), fallocate(1), qemu-img(1), http://libguestfs.org (AUTHOR) Richard W.M. Jones http://people.redhat.com/~rjones (COPYRIGHT) Copyright (C) 2011-2025 Red Hat Inc. (LICENSE) << >> (GNU General Public License) / ( ) . . . : Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. (BUGS) libguestfs : https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools libguestfs : https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools : o libguestfs. o libguestfs ( ). o . o libguestfs-test-tool(1) . guestfs-tools-1.56.0 2026-07-11 virt-sparsify(1)