Prologue

Most of the recent articles on this site have been around CentOS because I generally like CentOS or have at least become used to using it. Part of that is because we use CentOS at the office so I get some exposure during my day job.

The problem is that install Xen on CentOS is horribly, horribly documented and what documentation I have found installs an older version of Xen. Not that there is anything wrong with old versions, I generally try to be up to date on things.

Granted, I could just be an id10t and my google-fu could just be bad.

With that in mind, we will be install Xen on Ubuntu, specifically 14.04 LTS Trusty Tahr.

The Real Work

Installing the Operating System

Download Ubuntu Server and either burn a CD-ROM from the ISO or create a bootable USB drive. I would recommend installing on a real machine, even if it is pretty old. I personally have not managed to get Xen up and running on a virtual machine yet.

I won’t go over the installation since there is plenty of documentation out there. I would recommend installing and running the SSH server.

Post-Installation

Updates!

sudo apt-get -yq update && sudo apt-get -yq upgrade && sudo apt-get -yq dist-upgrade

Xen Preperation

I prefer to install and configure the bridging prior to installing Xen.

sudo apt-get -yq install bridge-utils

In order to configure the bridge, do sudo vi /etc/network/interfaces and modify it to look like:

auto lo
iface lo inet loopback

auto xenbr0
iface xenbr0 inet dhcp
    bridge_ports em1

auto em1
iface em1 inet manual

This will configure a new bridge call xenbr0 and hook it up to em1 so that it can talk with other machines. In order to activate the new configuration you can reboot or try:

sudo ifdown em1 && sudo ifup xenbr0 && sudo ifup em1

Install Xen

Thanks to the Ubuntu package management stuff, this is really easy.

sudo apt-get install xen-hypervisor-amd64

Sit back, relax because this will take a few minutes, especially on older hardware. Once the installation is complete, you should reboot the machine in order for the new Xen based kernel to load.

Verification

When the machine comes back up, log in and run sudo xl list. You should see output showing you the names and statistics around which virtual machines are running. Right now, it should only report about Domain-0.

What’s next?

There are some packages that I always like to have around in addition to some other tools for Xen that could be interesting. Feel free to install them or not depending on your likes and dislikes.

sudo apt-get -yq install git xen-tools

I’ll be writing up documentation on creating a virtual machine soon.

Credits

Here is some of the more helpful documents that I found around the web that helped me.



Published

16 October 2014

Category

infrastructure

Tags