How to install XenServer Tools on a Turnkey Linux appliance

There is now official how to for Xen Tools on any Turnkey Linux virtual appliance with XenServer, so here is a step-by-step guide on how to converr a Ubuntu 10.04 LTS-based Turnkey Linux appliance from running on Citrix XenServer in HVM-mode to PV-mode, enabling the install of Xen Tools. 
Please note that the latest build from Turnkey Linux may contain CentOS 6.1. I will follow up with a blog post on how to install xen-tools on that as well…

Instructions assume the TKL Appliance is already installed with the Ext3 filesystem(by default) and running on Citrix XenServer 6.x or later.

Comments are in parenthesis below.

On the TurnKey Linux Ubuntu Guest Console, run the following commands:
  1. apt-get update && apt-get install linux-image-generic-pae
  2. cp /etc/init/tty1.conf /etc/init/hvc0.conf
  3. nano -w /etc/init/hvc0.conf (replace all tty1 with hvc0)
  4. shutdown -P now

In the Citrix XenServer Console, run the following commands:
  1. xe vm-list power-state=halted (write down UUID for TKL VM)
  2. xe vm-param-set uuid=<UUID> HVM-boot-policy= (leave blank after equals sign)
  3. xe vm-param-set uuid=<UUID> PV-bootloader=pygrub
  4. xe vm-disk-list uuid=<UUID> (find VB disk UUID)
  5. xe vbd-param-set uuid=<VBD UUID> bootable=true
  6. Start appliance and restart XenCenter Manager

Back in the Ubuntu Guest Console, run the following commands to Install XenTools:
  1. mount /dev/xvdd /mnt (OR mount /dev/cdrom /mnt)
  2. dpkg -i /mnt/Linux/xe-guest-utilities*i386.deb (OR dpkg -i /mnt/Linux/xe-guest-utilities*amd64.deb for 64-bit appliances)
  3. umount /mnt
  4. sudo reboot

That’s it, you should now have XS-Tools installed and working. To check it go to the XenServer Center if you have it handy, and see that you now get Memory Performance and that it says under the General Tab -> Optimized version 6.1 installed.

{loadposition content_starwind600}