Differences between revisions 23 and 24
Revision 23 as of 2013-08-09 12:35:15
Size: 2636
Comment:
Revision 24 as of 2013-08-09 12:38:09
Size: 2889
Comment: update was wrong
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
List available templates and notive how those for debian are outdated
{{{
veewee vbox templates | grep Debian
}}}
Line 33: Line 38:
git clone https://github.com/jedi4ever/veewee
cd veewee/templates
git clone https://github.com/russkel/puppet-vagrant-boxes
cd puppet-vagrant-boxes
#VirtualBox 4.1.18 is the version contained in Debian Wheezy
cp -r debian-710-x64-vbox4212 debian-710-x64-vbox4118

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 Image

The box created here miss the following steps to be called Official Debian Image:

  • puppet and chef are installed via ruby gems, not using debian packages
  • The Veewee template is not maintained inside the Debian Infrastructure
  • Ideally Veewee should be available as a Debian Package

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
#VirtualBox 4.1.18 is the version contained in Debian Wheezy
cp -r debian-710-x64-vbox4212 debian-710-x64-vbox4118

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-vbox4118
# this command is from the offical veewee doku but not yet released
# veewee vbox export debian-710-x64-vbox4118

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

Export from VirtualBox to Vagrant Box format:

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

Using the freshly created box in Vagrant

A gpg signed basebox created with the method documented above is available at http://basebox.libera.cc/ (Signed with a debian maintainer keyring)

Add your new Vagrant Base box to your base box list

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

Start a new Vagrant env using it:

cd /tmp
/usr/bin/vagrant init my_debian7