Contributed by jcr on from the yo-dawg-I-heard-you-like-clouds dept.
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.
- virtualbox (from what I know OpenBSD doesn't support installing virtualbox, so you may need to run something else as the primary/host OS)
- 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 end
You 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.
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 destroy
You 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)