From FGWiki
Jump to: navigation, search


Xen is our current virtualization software. It is used to host public facing services.


Xen configuration is stored in /etc/xen/auto, all configuration files in this directory are automatically loaded when the system boots.

The backing stores for the VMs are LVM logical volumes

To manage the individual instances use the 'xm' tool.

quick cheat sheet

 xm list - show running xen instances
 xm create /etc/xen/auto/www.freegeekvancouver.org - create a new instance from the configuration file given
 xm console www - connect to the console of the given machine, Ctrl-] to disconnect
 xm destroy www - destroy a virtual machine using the name given in 'xm list'

Creating a new VM

In the puppet configuration site.pp add a stanza to the host machine.

Installing a VM host

Install Ubuntu 12.014 (preferably amd64 instead of i386). During install at partitioning choose guided with LVM and all files in one partition. It will then give a list of the partitions and how they will be used. Choose configure LVM and let it write changes. Then delete the 'root' volume and create it again with a size of 15-20G. This gives room to create volumes for the VMs to live on, otherwise the root volume would take up all available space.

Once booted configure networking as required and install the packages openssh-server and xen-hypervisor-amd64 or xen-hypervisor-i386 as appropriate. After they are installed run

 mv /etc/grub.d/10_linux /etc/grub.d/25_linux && update-grub

This makes the xen hypervisor boot by default. Finally reboot.

Virtual Machines

Xen Guest Xen Host IP Purpose
www Hosts/elm Hosts www.freegeekvancouver.org
There is a intresting Log you can view when you when puppetd -test

sudo tail /var/log/xen-tools/<FQDN>.log -f -n1000 handy when debuging