Switches the qemu/libvirt builder to leverage qcow2 for better efficiency and thinly provisioned disks. As a result, we skip disk zero-out in the postinstall.sh when $PACKER_BUILDER_TYPE is qemu, since the backing image is sparse to begin with.
Resultant qemu/libvritqcow2 backed vagrant .box for the packer "usage example" above:
$ du -h nixos-19.09-libvirt-x86_64.box
3.2G nixos-19.09-libvirt-x86_64.box
Greetings
nix-community/nixbox
maintainers, thank you for your efforts!This pull request does two things:
Introduces
disk_size
andmemory
packer (build-time) variables, and their defaults. Usage example:Switches the
qemu/libvirt
builder to leverageqcow2
for better efficiency and thinly provisioned disks. As a result, we skip disk zero-out in thepostinstall.sh
when$PACKER_BUILDER_TYPE
isqemu
, since the backing image is sparse to begin with.Resultant
qemu/libvrit
qcow2
backed vagrant.box
for the packer "usage example" above: