Virtualization With Xen Server

Posted on February 6th, 2013

Having a virtualized server farm can be very useful especially if you don’t want to have several servers on constantly. Virtualization allows for your different servers to run in a virtual machine instead.

Xen Server is a very popular option due to it being free for a trial which is actually sufficient for personal use. In this tutorial, we will cover the installation and configuration of a CentOS host.

This will be a very comprehensive tutorial as I need to build and setup one of these machines for work.

I am using a dual-core Xeon rig with 4GB of RAM as this virtual host.


First off, we are going to want to find a suitable host machine. Any 64 bit machine that is at least dual core and has 2 gigs of ram should be fine for running two very low powered instances. We will also need to download and burn the ISO to a CD. Once that is complete, read down for the installation portion of this tutorial.

For my machine, I have set up RAID 1 with two 250 GB drives. RAID is important to have with Xen Server and any other form of virtualization as you are holding multiple PCs on one installation. With only one hard drive, that poses a risk to everyone’s data on that server.


First of all, boot from the CD you have just burned. You will be welcomed by a Citrix Xen Server splash screen. Wait for that to continue automatically, or just hit ENTER.

Next, you will be prompted for your keyboard type. The default option,  “[qwerty] us” is the keymap we will use.


You will now be welcomed to Xen Server, warning you that this install process will wipe your drives clean.

Hit OK.

Accept the EULA.

Select the Hard drive that you would like to use for the install Process. Select the hard drive, select he correct disk that you would like to use. Select the option to install from local media, skip the disk check, and set up your password. Use something secure, such as your name but with letters and capitals, throw in a few special characters (!?@#$%^&*) and hit OK.

The next step is to select which NIC (Network Interface Card) you wish to use. I have two, so I will select the first one. If you have a static IP address, input this into the next step, otherwise, use DHCP (I will use DHCP just because I don’t have the specifics of the machine that I am building).

Set your hostname to whatever you wish it to be; you can see the DNS enteries to Google’s – and, respectively.

Select your geo zone. Since I am in Canada, I will select America. Please note, America refers to the continent, not just to the USA. Next is the City, I use Toronto seeing as I work here and live just 30 minutes away from here. This basically just sets the timezone.

Next step asks you to use NTP or just localtime. Use NTP, it means “Network Time Protocol” and will keep your system accurate all day and all night.

After that is taken care of, Xen Server should be installing.



You will notice at the end of the install that the CD pops out on its own. DO NOT, I repeat, DO NOT kill it with fire. This is okay. Once the computer reboots, you will see a screen that looks like this:

That is the boot screen. On the next section, I will cover installing a virtual machine to this host.

Now that we have a working Xen Server set up, we need to go by setting up a new virtual client.
First, we need to download the XenCenter desktop program. This can be done by going into the IP address of the newly created Xen Server within a web browser.

In my personal experience, the versions of this program for Linux are garbage, so I use a virtual machine running Windows in order to do these operations.



Notice the link in purple? That is XenCenter Installer. Click on that one and install it.

The next step is to add the Xen server to the client app. This can be done with the big “Add Server” button.




As you can see, I have the same IP as where I downloaded the client software; the username is root and the password will be whatever you set it as during the install process.


You should now see a screen of something similar to the image above.

Next, we add a virtual machine to this host. Remember, we are setting up a CentOS host, so keep this in mind. I will make this Debian compatible as well.



Right click on the Xen Server, and select “New VM.” It will ask you for a template. I used CentOS 6 64 bit. You can select Debian if that is what you are using.

Click next and the next screen will ask you to name this server. Put whatever you want; I believe you’re smart enough to do this without a picture.

Now comes the installation source. We are going to install from a URL so, naturally, we select the “Install from URL” option.

The URL we will use for this is (For Debian, use



You will be asked where to install this VM. You should see the local server, so use that.

Next, set the number of CPU’s you wish to use. For this, we will be doing a single core and 1 GB of ram.



Click Next. You will be prompted with the Storage configuration section of the setup.



Hit properties. We want this install to be 25 GB.



See where it says 8.0 and then GB? Change that to say 25.

That window should close, taking you back to your storage configuration. Hit next.

This will take you to the networking portion of this setup. If there are no items here, you can safely hit “Add…” Leaving all options at their default value, hit add again. You will now have virtual NIC’s.

Hit next again. Here you will see the confirmation page to make sure all of your settings are the way you want them to be.



Select Finish.

You should now see the virtual server you created.

Look for a console tab after you select the new VM. You should see a tab near the top labeled as “Console.” It is through this that you can install the actual operating system.


Have fun,