B.2 Sparse Copy

When reflinks are disabled or unavailable for use, the standard filesystem-level copy (cp) can optionally perform a sparse copy of Xen disks. A sparse copy operation designates unallocated blocks within the source vDisk file as not pre-allocated in the cloned copy. It is useful if you want to overcommit a disk for space efficiency or performance-related reasons. A non-sparse copy pre-allocates all disk blocks prior to usage.

By default, the decision to perform either a sparse or a normal copy is left to the cp(1) command, which uses a “crude heuristic” to determine whether the source file is sparse. However this heuristic can be overridden per-VM using the resource.vm.sparseCopy fact, or per-repository, using the repository.sparseCopy fact. If you decide to set either of these String facts, they must have one of the following values, as documented in the cp(1) man page: