Contributed by jcr on from the yo-dawg-I-heard-you-like-clouds dept.
Stefan Cocora (stefan.cocora<at>gmail) wrote in to tell us about using OpenBSD with vagrant and veewee.
Vagrant is a ruby-based open source programmatic management interface on top of virtualization (currently works with virtualbox, with planned support for kvm and others in future versions). Vagrant integrates with automated provisioning tools like puppet and chef to help you bring up the VM consistently every time (same package versions, same config files). If you mess up your OpenBSD VM beyond repair, then just destroy the instance and bring the VM back up again. It's great for learning, and allows you to make mistakes without having to reinstall OpenBSD.
site: www.vagrantup.com
code: github.com/mitchellh/vagrant
Vagrant Requirements:
- ruby
- virtualbox (from what I know OpenBSD doesn't support installing virtualbox, so you may need to run something else as the primary/host OS)
- vagrant
- an OpenBSD "base box" (Virtual Machine image)
- a directory (typically named "./vagrant") containing a "./vagrant/Vagrantfile" configuration file with the following info (the below file is bundled with my OpenBSD base box for either amd64 or i386 on github)
Vagrant::Config.run do |config| config.vm.customize ["modifyvm", :id, "--memory", "256", "--name", "openbsd50_amd64"] config.vm.box="openbsd50_amd64" config.vm.guest=:openbsd config.vm.boot_mode = :gui config.ssh.timeout = 300 config.ssh.max_tries = 50 endYou can invoke vagrant with the "vagrant up" command. Vagrant reads the "Vagrantfile" to know where to get the base box from (see docs) and then uses the virtualbox API to create your VM with the specified ram, cpu, networking, and other settings.
Example Usage:
Create and start the Virtual Machine
Shut down the VM (may error with OpenBSD but will shutdown the VM)# vagrant up
Destroy the VM, but not the contents of your vagrant/ directory# vagrant halt
# vagrant destroyYou can download OpenBSD base box images for vagrant from my github repository (specifically amd64 and i386), and you can find many other VM images contributed by others on the vagrantbox.es site. Vagrant doesn't always work perfectly with OpenBSD, please test it and if you find bugs submit them to the main vagrant github repository tracker.
Delving deeper to a complete OS installation from scratch, veewee behaves like installing your preferred operating system from a PXE installation, but does it programmatically (hence repeatably), without the need to set up DNS/tftp which are typically required for PXE installations. Everything happens on your desktop/laptop.
code: github.com/jedi4ever/veewee
With veewee you can create your own custom OS installation to use with vagrant or other forms of virtualization and avoid trusting the OS base boxes (images) created by others. The veewee README has the details, but all you need for veewee to work is ruby and the veewee ruby gem. Then you can list the templates bundled with veewee or create your own definitions from the provided templates. You'll find two templates for OpenBSD, one for i386 and another for amd64.
Why did I contribute to vagrant and veewee?
I like OpenBSD and I wanted an easier way of learning and breaking an OpenBSD installation, without installing it on a piece of hardware. These days, hardware is fast enough to accommodate multiple VMs running side by side with the primary OS.
(Comments are closed)
By Philipp (pb) on
I cannot identify box downloads in your github? The linked veewee templates dont install via PXE but from an ISO. I am currently into the PXE installations and it's a bit hairy to say the least.
One addition to the Vagrantfile reduces the need to install bash:
config.ssh.shell = "/bin/ksh -l"
Comments
By jcr (jcr) on http://designtools.org
>
> I cannot identify box downloads in your github? The linked veewee templates dont install via PXE but from an ISO. I am currently into the PXE installations and it's a bit hairy to say the least.
>
> One addition to the Vagrantfile reduces the need to install bash:
> config.ssh.shell = "/bin/ksh -l"
>
The 5.3 boxes are at http://www.vagrantbox.es/ but I'm not sure if they support PXE installs.
Comments
By stefan (94.11.4.14) on
> >
> > I cannot identify box downloads in your github? The linked veewee templates dont install via PXE but from an ISO. I am currently into the PXE installations and it's a bit hairy to say the least.
> >
> > One addition to the Vagrantfile reduces the need to install bash:
> > config.ssh.shell = "/bin/ksh -l"
> >
>
> The 5.3 boxes are at http://www.vagrantbox.es/ but I'm not sure if they support PXE installs.
Vagrant by default doesn't support installing from PXE. It is made to be used with an base "image" - basically the base of the OS.
Then you install whatever else you need on top of that with configuration management tools or just shell(bash,ksh,...)
By Carlos Valiente (81.168.12.40) carlos@pepelabs.net on