Académique Documents
Professionnel Documents
Culture Documents
04
http://www.jansipke.nl/installing-xenserver-tools-...
XenServer supports a lot of Linux and Windows operating systems out of the box, but Ubuntu isnt one of them. This means that running Ubuntu is slower, because it uses HVM (hardwareassisted virtualisation) instead of PV (paravirtualization). This article will explain how to create a paravirtualized Ubuntu 10.04 VM with the XenServer Tools installed. Many thanks go to the author of the article Ubuntu 10.04 LTS paravirtualised on Citrix XenServer (link no longer available). We start with creating and installing a VM with HVM. Create a VM from the Other install media template Attach the Ubuntu 10.04 ISO to the DVD drive of the VM Start the VM At the disk partitioning stage make sure to replace Ext4 with Ext3, or create a specific boot partition with Ext3 Select at least the OpenSSH server package to be able to log in to the VM remotely Finish installation and boot the VM We now create a new console and edit the boot settings. Connect to the VM using SSH Create a new console for Xen
sudo cp /etc/init/tty1.conf /etc/init/hvc0.conf sudo vi /etc/init/hvc0.conf
Copy the contents of menuentry near the bottom to a temporary text file, to be used as input for the makepv.sh script that we will use later on
menuentry 'Ubuntu, with Linux 2.6.32-21-server' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set 02899ea9-1876-4e7b-8ef8-2b09b598cedb linux /boot/vmlinuz-2.6.32-21-server root=UUID=02899ea9-1876-4e7b-8ef8-2b09b598cedb ro quiet initrd /boot/initrd.img-2.6.32-21-server
1 de 9
22-02-2011 11:35
http://www.jansipke.nl/installing-xenserver-tools-...
Make special note of /boot/vmlinuz, root=UUID= and /boot/initrd.img Shutdown the VM We now convert the VM to PV. Connect to the XenServer host with SSH Copy the makepv.sh script (download from here) to the XenServer host and make it executable
chmod +x makepv.sh
Run the makepv.sh script, replacing my-vm-name with the actual name of your VM
makepv.sh my-vm-name
Finally we install the XenServer tools. Boot the VM and log in with SSH In XenCenter, attach xs-tools.iso to the DVD drive of the VM Mount xs-tools.iso, install the correct XenServer Tools package (replace amd64 with i386 if necessary) and unmount xs-tools.iso
sudo mount /dev/cdrom1 /mnt sudo dpkg -i /mnt/Linux/xe-guest-utilities_5.5.0-466_amd64.deb sudo umount /mnt
In XenCenter, detach xs-tools.iso from the DVD drive of the VM (this ensures that XenServer does not complain about too many bootable devices) Reboot the VM and log in with SSH Make sure the services run at boot time
sudo update-rc.d -f xe-linux-distribution remove sudo update-rc.d xe-linux-distribution defaults
Reboot the VM for the last time Restart XenCenter to be able to log in to the console of the VM Posted in Cloud computing Tagged Ubuntu, XenServer previous postnext post
33 Responses
Write a Comment
1.
martijn 2010/06/08 at 14:55 | Permalink | The makepv.sh script cant handle VM names with spaces. This is because the lines 15, 20 and 32 dont wrap the variables with double quotes. Change the lines as follows and it will work with spaces: Line 15: if [ -z "$1" ] Line 20: VM=$1 Line 32: UUID=$(xe vm-list name-label=$VM params=uuid minimal)
2.
2 de 9
22-02-2011 11:35