77.9. How to create a sparse file

The sparse files can be used to build a dynamic expansion disk image file, so the file size increases only when the disk is filled in.

You can do the conversion directly from dom0 using the cp command.

You have only to add the -sparse=always parameter:

cp –sparse=always image.img image_sparse.img