Content. Why? At, our build, test and deployment system for our web apps and back-end services are a one-click affair thanks to the awesome. Up until now, our TeamCity server lived on a Rackspace Cloud Server. Not because it makes sense to have a CI server in the cloud (hint: it doesn’t). But simply because we happened to have that server lying around when we decided to give TeamCity a try.
And as its happens, our playground server ended up becoming our main (and only) CI server. Lately however, that setup started showing its limits. Raw performance of cloud servers aren’t great and prices are astronomical for what you get. CI is a terrible use-case scenario for a cloud server. So we decided to migrate our CI environment to a nifty from Hetzner. 32GB of RAM, quad-core processor, a couple of SSDs and great support for less than €50 / month?
What's not to love? Rather than a bare-metal install of Windows, we decided to give Xen on Ubuntu a try so that we could easily move the whole install to a new machine if needed by just taking a snapshot of the VM and moving the image file across. It also was a great opportunity to get up to speed with Linux again after not having used Linux in anger since 2000 (remember when the only way to get hold of a Linux distribution was to get down to your local newsagent and get it on the CD-ROM that came with Linux Magazine?). What followed was a exercise in pain and frustration. While Linux has definitely made great stride in the last 13 years in usability (I didn't have to recompile the kernel once!), Xen is as lovely to setup today as Linux was 13 years ago. So hopefully, this little guide will help save a few people from pulling their hair out trying to get Windows up and running on Xen. I’m assuming that you’ve got a basic understanding of virtualization and Linux and that you’re familiar with using SSH, navigating the file system, running commands as root and editing files with vi.
I’ll be using Ubuntu 13.10 and Xen 4.3 on a Hetzner dedicated server. Before you start: request an additional IP address You’ll need an IP address for your virtual machine. Unless you already have a spare IP you can use, request one from your host. Some hosts can take a few days to issue an extra address so do that now. If you’re on Hetzner. Login to the, select your server and click the IPs tab.
Click the “Ordering of additional IP” link at the bottom and order an extra IP stating “Virtual Machine” for the purpose of use. It might take a day or two for your IP to get issued. Xen, xend, xm, xl, XenServer, XAPI, XenAPI, xe, XCP, WTF? Before jumping in, you should take a minute to get familiar with the terms you’ll be faced with when googling for solutions for your Xen problems (and googling you will). Trust me, it will help. Here we go: Xen Xen is the hypervisor.
It was first created in the late 90’s as part of a research project at by Keir Fraser. It was open-sourced in 2002 and is now in version 4.3. Xen powers, among others, Amazon EC2, Rackspace Cloud Server and Linode. If you’re interested in history, check out the.
Xend and xm Xen itself doesn’t have any user interface - it only expose APIs. Several “toolstacks” have therefore been built to allow humans to create, start, stop, control and otherwise manage virtual machines running on Xen. Xend and xm are one of those toolstacks. Xm is a command-line tool that you can use to create and control Xen VMs. Xend is a deamon that xm communicates with and that does the actual work.
As of Xen 4.2, xm and xend have been deprecated and replaced with a new toolstack with the lovely name of ‘xl’. Xl xl is a Xen toolstack introduced with Xen 4.1 and made the default toolstack in Xen 4.2. Just like xm, xl is a command-line tool that you can use to create and control VMs running on the Xen hypervisor. Unlike xm, xl doesn’t rely on the xend deamon to do its work (so you can safely disable xend if you use xl and xend is still running on your server).
Xl is the toolstack we’ll use in this guide. Xl is mostly backwards-compatible with xm. So if you run into an xm command when googling, simply replace ‘xm’ with ‘xl’ in the command and it should work in the same way. XAPI, XenAPI, xe XAPI (short for XenAPI) is another toolstack for Xen, which we won’t be using in this guide. XAPI offers a lot more functionalities than xm and xl. Unlike xm or xl, XAPI isn’t a command-line tool but instead exposes an XML-RPC interface. You can use XAPI programmatically.
Or you can install and use the 'xe' command-line tool, which will call the XAPI for you. XenServer Unlike what its name suggests, XenServer isn’t a part of the Xen hypervisor but is a completely separate product.
We won’t be using XenServer in this guide. XenServer is a “turnkey open source virtualization solution”. It’s essentially a Linux distribution customised for running Xen VMs. It includes Xen (obviously) and the XAPI toolstack. It was initially created by a company called XenSource founded by Ian Pratt, one of the creators of Xen, as a commercial offering for the enterprise market.
It was acquired by Citrix in 2007, which kept commercialising and developing it. Up until recently, XenServer was partly closed-source. In June 2013, Citrix. XCP XCP stands for Xen Cloud Platform. It was the open-source subset of XenServer. Since Citrix fully open-sourced XenServer in June 2013, XCP has effectively lost any purpose and has been discontinued. Xen Basics Before progressing any further, go and read the.
Xso-249 Xencenter Build For Mac Free
It’s slightly out of date in the details but the main points apply and it’s a very easy to digest introduction to Xen. If you’re feeling lazy, read at least the first section “' in order to understand the terms ‘domains’, ‘dom0’, ‘domU’, ‘PV’ and ‘HVM’, which are at the core of everything in Xen. First things first: pick the right storage medium for your VM - Logical Volume or file-based disk image? Logical Volumes are the. Alternatively, if you haven’t setup LVM on your server, you can use a good old file-based disk image. If you’ve been living under a rock for the past decade as I have, you’ll have missed the rise of LVM - Linux’ Logical Volume Manager - and you’ll probably be quite confused by now. Think of Logical Volumes as virtual partitions for your drive.
Instead of having to decide up-front the size of your partitions, you can just use Logical Volumes instead of partitions. LVM then lets you easily expand or shrink your logical volumes as and when needed. And when I say easily, I mean easily. Check this out: lvcreate —name my-new-volume —size 60G vg0 lvextend —size 100G /dev/vg0/my-new-volume lvremove /dev/vg0/my-new-volume It's rare to see such beautifully designed interfaces in Linux. Hats off to LVM’s creator Heinz Mauelshagen for creating such a beauty.
There are many more advantages to using LVM instead of partitions. For a quick overview, check out the and the “” section in the Xen Beginner’s Guide.
And if you have time, the is also good. Is your server using LVM?