Installing TurnKey Linux VMs on Citrix XenServer can be really messy. The answer depends on the version of the TurnKey VM you are using:
Installing 12.0 TurnKey Linux VMs on Citrix XenServer 6.1/6.2:
Citrix XenServer console (create VM):
- New VM
- Choose Other template (implies HVM guest instead of PV)
- Choose ISO image for installation soure
- Add one disk for root and one disk for swap
- Start installing VM
- Chose entire disk instead of LVM (otherwise the disks cannot be resized by the host)
VM's console (configure guest):
apt-get update && apt-get upgrade && apt-get install linux-image-686-bigmem
- For the console you need to add the following line in
/etc/inittab
before line 1:2345:respawn:/sbin/getty 38400 tty1
:
co:2345:respawn:/sbin/getty 38400 hvc0
- In
/etc/fstab
switch from /dev/hd*
to /dev/xvd*
if needed
- Shut down the VM
Citrix XenServer console (change virtualisation technique for this guest from HVM to PV):
xe vm-list power-state=halted
(write down UUID for the VM)
xe vm-param-set uuid=UUID HVM-boot-policy=
(leave blank after equals sign)
xe vm-param-set uuid=UUID PV-bootloader=pygrub
xe vm-disk-list uuid=UUID
(find VDB disk's UUID of root partition)
xe vbd-param-set uuid=VBD's UUID bootable=true
- Reconnect to server in XenCenter Manager
VM's console (install XenTools)
- Start appliance
mount /dev/cdrom /mnt
/mnt/Linux/install.sh
umount /mnt
- Eject xs-tools.iso from the VM's CD-ROM, otherwise the VM won't boot.
sudo reboot
Installing 13.0 rc3 TurnKey Linux VMs on Citrix XenServer 6.2:
The 13.0 rc3 finally works with XenServer 6.2.0 without any major difficulties.
- Create new VM from Other install media (you get a HVM guest this way.)
- Installation source: ISO image
- Update packages using
apt-get
- Install XenServer tools
- Reboot
- Optionally: change guest's virtualisation method from HVM to PV as described above
The surprising thing is that you see memory, network and performance meters in XenCenter and can reboot, suspend or shut down the machine from there, as if it was a PV guest. If you check the HVM-boot-policy and PV-bootloader params of the VM, you'll see that XenServer recognizes it as a HVM guest, but that does not have any effect on the above mentioned features. Yet, it makes sense to change these params to get a PV guest.