How to create a Vagrant box. easy steps

vagrantGuide to the creation of a Vagrant Box


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:


  1. Create your Vm in VirtualBox
  2. Update your Vm (apt-get update & upgrade)
  3. Install Guest Addition to the new Vm [How to]
  4. Create, on the new Vm, a new user called vagrant with password vagrant
  5. Add the user vagrant to sudoers 
  6. Install puppet on the guest vm:# sudo apt-get install puppet-common
  7. Make the user vagrant able to sudo without password [how to]
  8. Upload (or paste) the public key used by Vagrant to the new Vm [Download keys]
  9. Shut down the Vm
  10. From the command line use “vagrant package” to build your box.

That’s it!

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.

(Visited 2,147 times, 1 visits today)

Author: Giuseppe Urso

Giuseppe lives in Haarlem now with his shiny dog, Filippa In 1982 received his first home computer, a Commodore 64, followed by Datasette and a 1541 Floppy Disk Drive. In 1999 he installed his first Linux distro (LRH6). In 2006 he switched to Debian as favourite OS. Giuseppe Urso actively sustains the Free Software Fundation and his founder Richard Mattew Stallman, he speaks to people trying to convince them to join the fight now, and about how important is to use Free Software only. He has a job as Infra Specialist at Hippo Enterprise Java Cms an Open Source Enterprise class Content Management System, one of the coolest company ever, in Amsterdam. He's always ready to install Debian on other people computers for free.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.