How To Add Ubuntu 16.04 LTS Template in XenServer 6.2

Channel: Linux
Abstract: Add Ubuntu 14.04 LTS Template $ UUID=`xe template-list name-label="Ubuntu Precise Pangolin 12.04 (64-bit)" params=uuid --minimal`Let’s start with crea

Today I have installed a new Citrix XenServer 6.2 at my workplace. When I connect it through XenCenter 6.2, I could not find a template for Ubuntu 16.04 LTS or 14.04 LTS. After googling I found below steps to create template for Ubuntu 16.04 LTS or 14.04 LTS in XenServer. How To Add Ubuntu 16.04 LTS Template in XenServer 6.2.

Step 1 – Update pygrub in Xenserver
  • Edit the file /usr/lib/python2.4/site-packages/grub/GrubConf.py on the XenServer host machine.
  • Got to line no 428 and change
    from:
    if arg.strip() == "${saved_entry}":
    

    to:

    if arg.strip() == "${saved_entry}" or arg.strip() == "${next_entry}":
    
  • Let’s start with creating new vms.
Step 2 – Create Templates for Ubuntu

Now execute following commands one by one to add a new template to the XenServer host. Below is the commands for adding Ubuntu 16.04 LTS and Ubuntu 14.04 LTS templates in your system. Add template as per your requirements.

Add Ubuntu 16.04 LTS Template
$ UUID=`xe template-list name-label="Ubuntu Precise Pangolin 12.04 (64-bit)" params=uuid --minimal`
$ NEW_UUID=`xe vm-clone uuid=$UUID new-name-label="Ubuntu Xenial 16.04 (64-bit)"`
$ xe template-param-set other-config:default_template=true other-config:debian-release=xenial uuid=$NEW_UUID
Add Ubuntu 14.04 LTS Template
$ UUID=`xe template-list name-label="Ubuntu Precise Pangolin 12.04 (64-bit)" params=uuid --minimal`
$ NEW_UUID=`xe vm-clone uuid=$UUID new-name-label="Ubuntu Trusty 14.04 (64-bit)"`
$ xe template-param-set other-config:default_template=true other-config:debian-release=trusty uuid=$NEW_UUID
Step 3 – Create New VM using Template

At this step, start with creating new VM using the newly created template. Open XenCenter, Right click on XenServer host and click New VM.

Enter the name and description of your new VM.

Select installation media source. If you have already had ISO, select the first option and choose ISO from the library. Else you can use the second option to install using net install URL. Enter http://us.archive.ubuntu.com/ubuntu as net install URL.

Now, follow the remaining on screen steps and complete Ubuntu 16.04 virtual machine installation on Citrix XenServer.

Ref From: tecadmin

Related articles