Login as root on your xenserver.
2. Edit the file /usr/lib/python2.4/site-packages/grub/GrubConf.py
Change line 428 from
if arg.strip() == "${saved_entry}":
Into
if arg.strip() == "${saved_entry}" or arg.strip() == "${next_entry}":
3. Press esc+:wq!
4. [root@azcxenserver ~]# TEMPLATE_UUID=`xe template-list name-label="Ubuntu Lucid Lynx 10.04 (32-bit)" params=uuid --minimal`
5. [root@azcxenserver ~]# NEW_TEMPLATE_UUID=`xe vm-clone uuid=$TEMPLATE_UUID new-name-label="Ubuntu Trusty 14.04 (32-bit)"`
6. [root@azcxenserver ~]# xe template-param-set other-config:default_template=true other-config:debian-release=trusty other-config:install-methods="ftp,http,cdrom" uuid=$NEW_TEMPLATE_UUID