This document is WORK IN PROGRESS

Introduction

This article tries to summarise Linux Virtual Machine methods and is in its early stage. It does not focus on different types of hypervisors, but more on the issues and features you get with each hypervisor.

Host Kernel

Some supervisors need their own (modified Linux) kernel to operate, whereas others work with any Linux kernel. Though some of them again need some configurations to be turned on in the stock kernel.

VM Installation

Depending on the hypervisor, there are different requirements and methods for the installation:

  • Installation can be done within the VM for completly isolated machines
  • Installation must be done outside / on the host for systems without own kernel

Some hypervisors can boot from the network, whereas others just create a very lightweight isolation and boot an installed system only.

Guest OS changes

Some hypervisors require changes to the virtual machines, to be able to run successfully. Others allow a original OS version to be installed.

Network configuration

Whether the VM is attached to a bridge, a tun/tap device, treated as a normal process, there may be a lot of different configurations. Furthermore, firewall (masquerade/nat) configurations may be necessary.

Additionally, some of the hypervisors support dynamic allocation of mac or even ip addresses.

Templates

Some hypervisors support reusage of installations.

Management

Most hypervisors contain some minor collection of utilities to manage virtual machines. Some libraries / frameworks try to integrate those utilities, to abstract the different implementations.

Typical issues are:

  • Autostart machines on startup / autostop on shutdown
  • Creation of new VMs / including template handling
  • Manual start/stop of VMs
  • Listing of running / existing VMs

Automated usage

Especially interesting for a sysadmin is, how easy a system can be automated, which steps need to be taken to get a new image or copy of an existing one. This aspect is one focus of this document.

Hypervisors

Name Host Kernel Guest OS changes Installation
QEMU Original no inside
KVM Original w/KVM no inside
Lguest Original w/Lguest ? ?
Linux Containers Original w/Containers yes outside
Linux VServer Own ? ?
User Mode Linux Original ? outside
OpenVZ Own ? ?
Virtualbox Original+Modules no inside
VMWare Original+Modules / Own no inside
Xen Own ? ?

lxc

Some hints on lxc:

  • Helper scripts existent (lxc-debian, lxc-fedora, ...)
  • adjust init. change dev. do not run udev (why?)
  • Root open in the filesystem
  • No network specified = all from host accessible!

Management Libraries / Frameworks

Name Hints
Ganetti
Libvirt

Poor man's management

This sections describes typical vm management tasks, done with easy commands.

Creating a new (sparse) image file

dd if=/dev/zero of=<filename> bs=1 count=0 seek=<gigabytes>G