This is a tutorial to rebuild Teams/Cloud/VagrantBaseBoxes yourself.
Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. Packer is written in Go.
sudo apt install packer virtualbox qemu-kvm
NOTE: virtualbox is in contrib because the emulator part requires a BIOS that can only be compiled with a non-free compiler. However we're using here only to test the Vagrant box, it is not required for building the box.
As of 2017-11-16 import2vbox.pl (https://github.com/EmmanuelKasper/import2vbox) is included in the scripts/dir of the debian-vm-templates git repo (see below) and does not have to be installed separately.
Otherwise it can be directly downloaded from the upstream repository.
Anyhow it requires the XML::Writer and Sys::Guestfs perl modules. They can be installed with:
sudo apt-get install libxml-writer-perl libguestfs-perl uuid-runtime
Rebuild the vanilla Debian base boxes
Checkout the debian-vm-templates git repo:
git clone http://anonscm.debian.org/cgit/cloud/debian-vm-templates.git/
Validate a template before building
cd debian-vm-templates/packer-virtualbox-vagrant packer validate jessie.json
Rebuild the box. This will start a VirtualBox virtual machine, in which a preseeded debian installer will run:
packer build jessie.json
This produces only a RAW Qemu image, however. To produce a BOX file as expected by Vagrant, you should probably use the wrapper scripts provided in the Makefile, which also test the box:
#build a Jessie base box, and test it is working as expected make jessie.tested
The resulting box will be in jessie.box.
If you see the following error when trying to build a basebox:
ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
It's most likely because VirtualBox is still running a VM. You may need to shutdown (vagrant halt) all running VMs to complete the build.