Basebox building

Basebox building

The one I use: roderik/VagrantQuantal64Box

Without Veewee, as by the book: cal/vagrant-ubuntu-precise-64 · GitHub

opscode/bento · GitHub


Build your own basebox: Veewee is used for building your baseboxes. If we want much wider selection of base-boxes (FreeBSD for example).

If we need FreeBSD or even Windows? That we do. And, to be able to use vagrant, you need a basebox with the virtualbox and guest additions versions matching correctly. :: jedi4ever/veewee · GitHub :: File: README — Documentation for veewee (0.2.3) :: veewee/doc/ at master · jedi4ever/veewee · GitHub :: veewee/templates at master · jedi4ever/veewee · GitHub

Install Veewee from RubyGems, with simple: gem install veewee

If Vagrant is not properly configured, you could get an Error #1 (everything felt apart, even Vagrant itself). But, normally, this should work as expected.

You could do a manual install from Git:

git clone cd veewee gem install bundler bundle install

Keep Veewee templates updated

I chose to install Veewee from gem instead from source, because it’s easier. But, it looks like it comes with horribly out of date basebox templates.

So, I found a nice tool against that problem: :: veewee-templates-updater - A Hidden Little Gem

And install with: gem install veewee-templates-updater


After installing, list available baseboxes: vagrant basebox templates


List of available templates: :: veewee/doc/ at master · jedi4ever/veewee · GitHub

Setup: :: fadhlirahim/vagrant_veewee · GitHub

Articles: :: Building Vagrant boxes with veewee :: lumoslabs/vagrant-boxes · GitHub :: Vagrant and veewee: A Repeatable Dev Project Setup - Rogish Reading Writing :: Virtual Machines with Vagrant, Veewee and Puppet — Whitewashing How to build windows guests with Veewee:

Problems & Solutions

Error #1: Solvable

Error message: Unable to activate virtualbox-0.9.2, because ffi-1.1.5 conflicts with ffi (~> 1.0.9) (Gem::LoadError)

The solution could be to uninstall old (or new) version of library. Specifically this FFI library has problems with Windows after version 1.0.10.

To install older version is, use ‘-v’ switch: vagrant gem install ffi -v=‘1.1.4’

Source: :: ruby - ERROR: Error installing ffi: ERROR: Failed to build gem native extension - Stack Overflow Version 1.1.5 has issues compiling on windows. :: ruby - Watir will not install with XP x86 or Win 7 x64. Getting error building native extension for the FFI gem - Stack Overflow

Error #2: Can’t be solved

Veewee is working as expected. Except, the ‘build’ and ‘destroy’ commands. For example, try: vagrant basebox build

Error message: Failed to create WIN32OLE object from `VirtualBox.Session’ (WIN32OLERuntimeError).

There is no solution. The main issue is that win32ole isn’t supported on 64-bit windows systems yet.

There is no way to make it work in Windows 7 64bit: :: Issue #37: Versioned interface doesn’t detect version on Windows · mitchellh/virtualbox

Install Ruby on Linux (I want Bundler)

The best installing with RVM. Never-ever install from apt-get? Why? Perfect tutorial:

And automates version of it is railsready script:

So just type: wget –no-check-certificate && bash

You could then remove the part about Rails. Don’t remove Git as it’s used by RVM to fetch the latest source for some versions of Ruby. But I won’t.

I won’t use that at all. I want it manually - with RVM. That like “manual” :) Howto:

# zlib is needed or you'll get an error later (rvm reinstall 1.9.3)
# see:
# see:
# Fix: no such file to load -- zlib
sudo apt-get install curl zlib1g-dev
\curl -L | bash -s stable --ruby

# And update the hell out of it
gem update --system
gem update

# Now you need to reboot. Need to propagate changes in .bash_profile
# Or you could type in every terminal
source ~/.rvm/scripts/rvm

# Note that if you log in graphically in Ubuntu, .bash_profile will not be
# read. That's normal.
# See:
# See:
# Check if this is login shell with:
#   shopt login_shell
# Simplest solution:
#   copy important thing from ~/.bash_profile to ~/.bashrc

grep ".rvm/scripts/rvm" ~/.bash_profile >> ~/.bashrc

# Install Bundler

# Fix: libxml2 is missing
apt-get install libxslt-dev libxml2-dev

# Fix: cannot load such file -- openssl (LoadError)
apt-get install libssl-dev
rvm pkg install openssl
# rvm install 1.9.3-dev
gem install bundler

Devbox basebox

This had to be changed:

#!/bin/bash -eux

Install Chef.

Omnibus Installer is the recommended method.

mkdir /tmp/chef-install cd /tmp/chef-install wget “" -O chef.deb dpkg -i chef.deb rm -rf /tmp/chef-install


B.4. Contents of the preconfiguration file (for raring)

The main way to discover all of the available preseeding options is to use debconf-get-selections. For instance, to find out all of the current preseed settings from your current install, you would run

$ debconf-get-selections –installer > alloptions.cfg

Install selections:

tasksel –list-tasks tasksel –task-packages server

For example: server (Basic Ubuntu server) openssh-server (OpenSSH server)

The main way to discover all of the available preseeding options is to use debconf-get-selections. For instance, to find out all of the current preseed settings from your current install, you would run

debconf-get-selections --installer > preseed-options.txt
date 01. Jan 0001 | modified 10. Jun 2024
filename: Vagrant - Basebox building