In these easy steps is described the process for the creation of a fully working Vagrant box. I suppose you already installed Vagrant.
This procedure will take place using two software:
- Create your Vm in VirtualBox
- Update your Vm (apt-get update & upgrade)
- Install Guest Addition to the new Vm [How to]
- Create, on the new Vm, a new user called vagrant with password vagrant
- Add the user vagrant to sudoers
- Install puppet on the guest vm:# sudo apt-get install puppet-common
- Make the user vagrant able to sudo without password [how to]
- Upload (or paste) the public key used by Vagrant to the new Vm [Download keys]
- Shut down the Vm
- From the command line use “vagrant package” to build your box.
Some detail and comment.
Try to keep updated your box as much as possible, so a few updates will be necessary when you will start using this machine. Try to keep small your vagrant box,at the end a box is a file and the smaller the better.