[CentOS-devel] The status of our Vagrant images for Hyper-V

Fri Apr 7 11:51:03 UTC 2017
Laurentiu Pancescu <lpancescu at gmail.com>

Some more information after experimenting with sparse images (both me 
and Michael).

After creating a .vhd image in a Vagrant guest, transferring it to a 
Windows machine while preserving its sparse nature proved to be not so 
straightforward.  Samba, scp and rsync produce a regular 40GB file at 
the destination, not a sparse one.  Probably the only chance is to use 
GNU tar or bsdtar on the guest to create a tar archive containing the 
sparse file, and use GNU tar to expand that on Windows, after 
transferring the archive (which is a regular file).  That's just for a 
quick test: an official Vagrant image would need to be extracted by 
Vagrant on Windows, we still to figure out what it will do.  Does anyone 
have any experience with backup software typically used on Windows, 
especially if they can backup and restore sparse files?

On OS X, the HFS+ filesystem has no support for sparse files, and Apple 
removed sparse file support from their implementation of UFS (which used 
to have them).

On 06/04/17 14:03, Laurentiu Pancescu wrote:
> We should probably either:
> - call GNU tar from Image Factory to preserve the sparseness of our 
> image files (and hope that Windows handles them properly)
> - use VBoxManage to convert to .vhd (VirtualBox is not in our repos, but 
> Oracle offers a .rpm for EL7 systems).

I would prefer the second option, using VBoxManage to produce small 
non-sparse .VHD images for our Vagrant boxes, and avoid the 
compatibility problems posed by sparse files.  But this would need to be 
done in Image Factory, so it's actually for Ian to decide if using 
VirtualBox is acceptable.