The following guide will show you how to install Ubuntu 14.04 LTS guest on XenServer 6.5 hypervisor host which can be downloaded for free at Citrix XenServer . More on installing and setting up Xen Server in another post.

Fire up XenCentre XenCenter and select a server in the Resources pane, right-click and then click New VM.

1. Create New VM

  • Select a template.
  • The first step is to choose a VM template. Templates contains the setup information needed to create a new VM with a specific guest operating system, and with the optimum storage, CPU, memory and virtual network configuration. We want to choose the Ubuntu Trusty Template.
  • Give the new VM a name.
  • Next, you give the new VM a name and, optionally, a description. Give your VMs meaningful & memorable names. Also remember to treat your servers like cattle not pets!
  • Specify the operating system installation media.
  • The third step in the process is to specify the type and location of the OS installation media. I have my Synology mapped with ISO's so i just select the Ubuntu iso.
  • Choose a home server.
  • This step is optional, but you can choose a home server for the new VM. XenServer will always attempt to start the VM on the nominated home server if it can. See Home server for more information on this step.
  • Configure CPU and memory.
  • Next, you can assign virtual CPUs (vCPUs) to the new VM, specify the topology, that is, specify the number of cores per socket you would like to present to the vCPUs, and allocate memory. My advice would be to select 1 vCPU and 1024MB RAM
  • Assign a virtual graphics processing unit (vGPU).
  • The New VM wizard prompts you to assign a dedicated graphics processing unit (GPU) or a virtual GPU (vGPU) to the VM. This enables a VM to use the processing power of the GPU, providing better support for high-end 3D professional graphics applications such as CAD/CAM, GIS, and Medical Imaging applications. Not required so we move on.
  • Configure storage.
  • The next step is to configure some virtual disks for the new VM. A minimum of one virtual disk is automatically configured by the wizard, and the template you select may include more. I choose the local SSD but you can use a SAN/NAS for HA.
  • Configure networking.
  • The last step in the process of provisioning a new VM is to configure networking. You can configure up to 4 virtual network interfaces on each VM. See Configure virtual network interfaces for more information on this step.
  • Complete new VM creation.
  • On the final page of the wizard, you can review all the configuration options you have chosen. Make sure to de-select the Start VM automatically check box to not start the new VM automatically.

2. Double check all the setting are correct and that everything is good to go then fire up the VM.

  • Choose English UK as language
  • Qwerty as keyboard
  • Setup username & passwords
  • Enable automatic updates
  • Select only "OpenSSH server"
  • Install GRUB boot loader to MBR: Yes.
  • Choose Europe/London GMT as time zone: Yes.
  • Use guided partition and write to disk, install.

3. Boot the VM and login with username provided when setup. Command:

sudo apt-get update && sudo apt-get upgrade -y

4. Go back to XenCenter and Select xs-tools.iso from "DVD Drive 1" and let it mount on the VM.

5. Mount XenServer Tools. Command:

sudo mount /dev/xvdd /mnt

-OR-

sudo mount /dev/cdrom /mnt

You may encounter the following, this means the disc has been mounted in read only mode

mount: block device /dev/cdrom is write-protected, mounting read-only

6.Install XenServer Tools. Command:

cd /mnt/Linux
sudo dpkg -i *amd64.deb
cd /
sudo umount /mnt

(It might fail, it should be fine though.)

sudo reboot

7.Eject xs-tools.iso from "DVD Drive 1" in Xenceter.

8.Boot the VM and login with username provided when setup. Command:

sudo apt-get update && sudo apt-get upgrade -y

9.Finished. You now have a fresh install of Ubuntu on XenServer host. Now take a snapshot and convert into template for a quick way to launch ubuntu VM's already installed and ready to go with xentools.