Differences between revisions 10 and 11
Revision 10 as of 2013-07-04 12:53:30
Size: 2138
Comment:
Revision 11 as of 2013-07-04 13:02:55
Size: 2495
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
= Creating a Debian7 Vagrant Base Box = = Creating a Vanilla Debian7 Vagrant Base Box =

{{{#!wiki caution
'''This will not create an Official Debian base Box'''

The box created here miss many components to be called [[https://wiki.debian.org/Teams/DPL/OfficialImages|Official Debian]] Boxes:
  * puppet and chef are installed via ruby gems, not using debian packages
  * The Veewee template is not maintained inside Debian
}}}

Translation(s): none


Veewee is a tool for easily (and repeatedly) building custom Vagrant base boxes (VirtualBox format), KVMs, and virtual machine images.

Creating a Vanilla Debian7 Vagrant Base Box

This will not create an Official Debian base Box

The box created here miss many components to be called Official Debian Boxes:

  • puppet and chef are installed via ruby gems, not using debian packages
  • The Veewee template is not maintained inside Debian

Install VirtualBox

apt-get install virtualbox linux-headers-amd64

Install Veewee requirements

apt-get install ruby ruby-dev build-essential libxslt1-dev libxml2-dev

Install Veewee as a Ruby gem

gem install fog --version 1.8
gem install veewee

List available templates and notive how those for debian are outdated

veewee vbox templates | grep Debian

Get updated veewee definitions (ie local templates)

git clone https://github.com/russkel/puppet-vagrant-boxes
cd puppet-vagrant-boxes

Veewee chokes on downloading the guest additions, we have to do it ourselves: you'll get this error

Downloading vbox guest additions iso v  - http://download.virtualbox.org /virtualbox//VBoxGuestAdditions_.iso
Checking if isofile VBoxGuestAdditions_.iso already exists.
Full path: /root/puppet-vagrant-boxes/iso/VBoxGuestAdditions_.iso
/usr/lib/ruby/1.9.1/open-uri.rb:346:in `open_http': 404 Not found (OpenURI::HTTPError)

Download the virtualbox Guest Additions

wget http://download.virtualbox.org/virtualbox/4.1.18/VBoxGuestAdditions_4.1.18.iso -O iso/VBoxGuestAdditions_.iso

Start building the VM

veewee vbox build debian-710-x64-vbox4212
veewee vbox export debian-710-x64-vbox4212

At this point you will see the VM in VirtualBox and use it normally.

Export from VirtualBox with to Vagrant Box format:

/usr/bin/vagrant package --base debian-710-x64-vbox4212 --output debian-710-x64-vbox4212.box

Using the freshly created box in Vagrant

Add your new Vagrant Base box to your base box list

/usr/bin/vagrant box add my_debian7 debian-710-x64-vbox4212.box

Start a new Vagrant env using it:

cd /tmp
/usr/bin/vagrant init my_debian7