NOTE: This gist is accompanied by my git repository example-of-packer-and-ansible-with-virtualbox. It contains an example of using Packer and Ansible to create a CentOS 7 VirtualBox machine image.
There did not seem to be much information out there on the internet for this so it seemed worthwhile to pass on this knowledge.
Packer from Hashicorp is a tool for creating machine images. It can be used with plugins, called Provisioners, to extend it.
I use the Ansible Provisioner to execute an Ansible playbook to configure the internals of the virtual machine.