Local testing with KVM, VDE and dnsmasq

From FAIWiki
Revision as of 19:45, 20 July 2009 by Mgoetze (talk | contribs) (motivation & goal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Motivation

Imagine you already have a production infrastructure using FAI. You keep your config space in revision control and the production servers only have read-only access to the repository. Of course, you don't want to clog up the changelog with lots of revisions while testing changes. And of course, if you deploy a not perfectly tested change on your production infrastructure, and a colleague installs a server just at that moment, bad things can happen.

Or maybe you just can't be bothered to test everything on real servers. After all, they can be pretty slow to boot up with hardware RAID controllers, remote access cards and the like all needing to be initialized.

Or maybe you want to be able to work on your FAI configuration on your laptop while on the train, with no ready access to your regular DHCP and TFTP infrastructure.

In such cases, you would like to be able to work on your FAI configuration without leaving the comfort of your own workstation. And since even laptops are equipped with insane amounts of RAM nowadays, virtualization is an obvious solution.

Goal

This Howto is written for Debian Lenny. It will show you how to install a [KVM] virtual machine via PXE, connected to your workstation via [VDE], with [dnsmasq] providing DHCP and TFTP services.

Please note that KVM is not a very good option if you have an old CPU with no virtualization extensions. Check your /proc/cpuinfo for the vmx or svm flag.