Packer is one of the tools I’ve used in the past to build VirtualBox boxes. You can find what I’ve done on my GitHub account.
For Smash project, I wanted to make a packer configuration to manage Docker and VirtualBox. I also wanted to call Ansible to build specific images for each needs. The goal is to be able to build cloud image ready to start, without any special dependencies. This because I need different usages: