Paravirtulization with Citrix XenServer 6.0 and Ubuntu 12.04
In light of everyone’s interest in how to set up Paravirtulization with Citrix XenServer 5.5 and Ubuntu 10.04 and Ubuntu Precise Pangolin 12.04 LTS being released, you may be interested in getting the new Long Term Support (LTS) version running in Paravirtualized (PV) mode.
Even more exciting is that while the latest version of Citrix XenServer 6.0.2 doesn’t come with an Ubuntu 12.04 template out of the box, the Ubuntu 12.04 officially supports Xen. The release notes proclaim:
Xen is now included and officially supported:
- Provides the facility to run Ubuntu as a Xen virtualisation host (dom0)
- Libvirt integration/Xen domains manageable through libvirt or any frontend that uses libvirt.
- Guest installations in HVM mode will use optimized paravirt drivers out of the box.
As a background refresher, Xen runs virtual machines (VMs). There are a couple of different types of VMs:
- When most people think of a VM, they think of a hardware virtualized machine (HVM), where everything is in a container. The hypervisor’s (Xen Hypervisor) OS/controller (XenServer) — also known as a Dom0 — has no insight to the VM — also known as the DomU.
- Paravirtualization (PV) is different from HVM in that it provides special “hooks” to share information between the guest VM and the host hypervisor, providing for lower overhead. With PV, the Dom0 (XenServer) has insight and can better share resources with the DomU (VM).
Here’s how to get it all to play nicely without going through the hackery that we used to need to do…
Open up the XenServer console and clone the included Ubuntu 10.04 template to create your new template (of course you can substitute “32-bit” if you need):
xe vm-clone uuid=`xe template-list name-label="Ubuntu Lucid Lynx 10.04 (64-bit)" --minimal` new-name-label="Ubuntu Precise Pangolin 12.04 (64-bit) (experimental)"
Update your new template to point to the version of Ubuntu you want to install (in this case, we’re looking at “precise”):
xe template-param-set other-config:default_template=true other-config:debian-release=precise uuid=`xe template-list name-label="Ubuntu Precise Pangolin 12.04 (64-bit) (experimental)" --minimal`
Walk through setting up a “New VM” just like normal, selecting your new template.
On the screen that asks for the installation media, choose “Install from URL:” and enter:
Bada bing bada boom, you’ve got yourself a fresh install of Ubuntu 12.04 running in PV mode!