This is more of a quick checklist for building a CentOS box with Vagrant and VeeWee than a real blog post.


Building a CentOS box

  • Create working directories and copy the ISO image
$ mkdir -p ~/vagrant/centos60build/iso
$ cd ~/vagrant/centos60build
$ cp __PATH_TO_THE_ISO_IMAGE__ ./iso/
  • Create a box definition
$ vagrant basebox define centos60 CentOS-6.0-i386
  • Make any changes you need to the definition file in definitions/centos60/definition.rb. Make sure the name of the ISO and its MD5 are correct.
  • Adjust postinstall and kickstart files if you need to
  • Kickstart a Virtual Machine with CentOS 6.0 (this is going to take a while)
$ vagrant basebox build centos60
  • Check that it is functional
$ vagrant basebox validate centos60
  • Build a Vagrant box file
$ vagrant basebox export centos60
  • Import it to Vagrant
$ vagrant box add centos60

Using your new box

To spin off a new instance, run the usual Vagrant commands:

$ vagrant init centos60
$ vagrant up
$ vagrant ssh

Check out these instructions on how to set up Fabric so that it can talk to your Vagrant VM instances.

comments powered by Disqus


29 November 2011