You are on page 1of 2

Installing Ubuntu Server 10.04 (Lucid Lynx) on XenServer 5.

5
Source document: http://www.aikidokatech.com/index.php?
option=com_content&view=article&id=65:ubuntu1004bxs56&catid=37:xen

Modified by: pepoluan

Modification reason: Some steps in the Source Document is applicable only for XenServer 5.6 Beta; the
procedure below is totally applicable for XenServer 5.5

1. First create a VM in XenCenter. Use the “other install media” template.

2. Install Ubuntu to your liking


a. Just in case anything goes wrong with getting console output, it is recommended that you
install the SSH server.
b. If you want to use something other than ext3:
i. Make a small first partition for /boot formatted as ext3 (must be primary outside
LVM!)
ii. Make the remaining partitions whichever file system you like.
Note: I have found that Ubuntu Lucid – if we use “Guided with LVM” – seems to by default
creates a 230MB boot partition as ext2, then within the LVM creates a root VG as ext4
followed by a swap VG as swap

3. The console for the DomU in PV mode will be hvc0. You will need to tell getty to use this. Copy
the existing tty1.conf and edit it to replace "tty1" with "hvc0".

sudo cp /etc/init/tty1.conf /etc/init/hvc0.conf


sudo vim /etc/init/hvc0.conf

4. Open /boot/grub/grub.cfg, and note some very important information:


a. Search for “<hostname>-root” (e.g., ubuntu10-root)
b. Note the UUID on the next line. This is <UUID grub root>
c. Search for “menuentry”. Ensure that the line reads something like “menuentry 'Ubuntu, with
Linux 2.6.xx-xx-server”.
d. Note the kernel name (something like vmlinuz-2.6.xx-xx-server). This is <kernel name>
e. Note the initrd name (something like initrd.img-2.6.xx-xx-server) . This is <ramdisk
name>

5. Shutdown the VM.

6. Retrieve the UUID for the VM.

xe vm-list name-label=<name of VM> params=uuid

7. Retrieve the VBD UUID for the storage attached to the VM.

xe vm-disk-list uuid=<UUID>

8. Clear out the HVM boot policy.

xe vm-param-set uuid=<UUID> HVM-boot-policy=

9. Set the PV bootloader to pygrub.

xe vm-param-set uuid=<UUID> PV-bootloader=pygrub


10. Specify the arguments you need for the VM. Specify the kernel, ramdisk, and other options that are
present in the VMs grub.cfg. Make sure you use the entries from your grub file as you’ve noted in
step lebih dari.

xe vm-param-set uuid=<UUID> PV-bootloader-args="--kernel=<kernel name> \


--ramdisk=<ramdisk name>"

xe vm-param-set uuid=<UUID> PV-args="root=UUID=<UUID grub root> ro quiet splash"

11. Set the VBD for the VM to be bootable.

xe vbd-param-set uuid=<VBD UUID> bootable=true

12. Start the VM and login. If your console fails to appear or seems to hang, try closing and reopening
XenCenter.

13. Attach the xs-tools.iso to the VM and mount the image. Mount will claim /dev/cdrom1 does not
exist if it has not yet been attached to the VM in XenCenter.

sudo mount /dev/cdrom1 /mnt

14. Install the XenServer tools. Make sure you use the proper file for your architecture (amd64 or i386).
A quick "ls" will confirm the version of the utilities in you xs-tools.iso. My file name my differ.

sudo dpkg -i /mnt/Linux/xe-guest-utilities_5.5.901-562_i386.deb

15. Now, the above .deb file is designed for Debian, so it does not install properly on Ubuntu. Fix the
installation using the following commands:

sudo update-rc.d -f xe-linux-distribution remove


sudo update-rc.d xe-linux-distribution defaults

16. Unmount the iso image and then detach it in XenCenter.

sudo umount /mnt

17. You are now up and running.

18. Update the system with aptitude.

IMPORTANT NOTE ! ! !

If you ever update your kernel, please follow these steps after aptitude completes:
a) Record new grub.cfg information (follow Step 4)
b) Update PV*-args from XenServer’s console (follow Step 10)
c) Restart Ubuntu

These steps are necessary because, unlike the steps in the source document, we do not modify/patch
pygrub and GrubConf.py, so XenServer can’t automatically detect kernel changes.

You might also like