Line 26: | Line 26: | ||
− | == Collect Boot Information == | + | === Collect Boot Information === |
We need to gather some info for the next step. | We need to gather some info for the next step. | ||
Go to the directory containing the grub configuration file: | Go to the directory containing the grub configuration file: | ||
Line 63: | Line 63: | ||
− | == Shutdown the VM == | + | === Shutdown the VM === |
Shut down the VM | Shut down the VM | ||
halt -p | halt -p | ||
Line 125: | Line 125: | ||
− | + | == Graphical Console == | |
The "Desktop" and "Alternate" distributions of Ubuntu boot into X11/Gnome. In order to access the Gnome session from XenCenter (rather than the CLI console) you need to enable VNC on Ubuntu and setup gdm to call vnc on display 0. | The "Desktop" and "Alternate" distributions of Ubuntu boot into X11/Gnome. In order to access the Gnome session from XenCenter (rather than the CLI console) you need to enable VNC on Ubuntu and setup gdm to call vnc on display 0. | ||
''NOTE:'' Most tutorials involving gdm/VNC involve setting up xinetd, but if you have any packages that require openbsd-inetd (like LTSP) then you cannot install xinetd. [http://ubuntuforums.org/showthread.php?t=569451 Here] is a link for running vnc as a service from openbsd-inetd. | ''NOTE:'' Most tutorials involving gdm/VNC involve setting up xinetd, but if you have any packages that require openbsd-inetd (like LTSP) then you cannot install xinetd. [http://ubuntuforums.org/showthread.php?t=569451 Here] is a link for running vnc as a service from openbsd-inetd. | ||
− | + | == Files == | |
Reference HowTo in PDF<br> | Reference HowTo in PDF<br> | ||
Line 140: | Line 140: | ||
− | + | == References == | |
====PV / XS-Tools ==== | ====PV / XS-Tools ==== | ||
http://www.bishopbarrington.net/wiki/howto/lucidonxenserver | http://www.bishopbarrington.net/wiki/howto/lucidonxenserver |
Revision as of 18:38, 30 May 2010
Contents
Ubuntu 10.04 LTS
Install
Within XenServer Create a new VM using the "Other Install Media".
Choose an Ubuntu amd64 ISO, i386 ISO's don't seem to work.
NOTE: XenServer 5.5 doesn't support booting from the ext4 file system! During the install process make sure to format the / partition as ext3 or create a separate /boot partition formatted as ext3 so that XenServer can access the boot images.
Make sure to enable OpenSSH either during the install or upon first boot.
After the install is finished, boot the new VM.
If you didn't enable SSH access during install, now is the time to do it:
sudo apt-get install openssh-server
Modifications to the Guest OS
We need to create console for Xen, the easiest way to do this is to copy tty1.conf to hvc0.conf
Duplicate /etc/init/tty1.conf
cd /etc/init sudo cp tty1.conf hvc0.conf
Do an inline find and replace with sed
sudo sed -i 's/tty1/hvc0/g' hvc0.conf
Collect Boot Information
We need to gather some info for the next step. Go to the directory containing the grub configuration file:
cd /boot/grub/
Now edit grub.cfg and find the following line (the lines may differ from yours as the kernel may have been updated since this writing). You want the following information:
- Kernal
- Boot Arguements
- Boot Image
It should look something like this:
### BEGIN /etc/grub.d/10_linux ### 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 96ae5c39-aed3-4fb8-821b-c8f7463d7c76 linux /boot/vmlinuz-2.6.32-21-server root=UUID=96ae5c39-aed3-4fb8-821b-c8f7463d7c76 ro quiet initrd /boot/initrd.img-2.6.32-21-server }
We are looking for these lines:
linux /boot/vmlinuz-2.6.32-21-server root=UUID=96ae5c39-aed3-4fb8-821b-c8f7463d7c76 ro quiet initrd /boot/initrd.img-2.6.32-21-server
Kernel
/boot/vmlinuz-2.6.32-21-server
Boot Arguments
root=UUID=96ae5c39-aed3-4fb8-821b-c8f7463d7c76 ro quiet
Boot Image
/boot/initrd.img-2.6.32-21-server
Shutdown the VM
Shut down the VM
halt -p
MakePV Script
This script will automate the process of converting the VM to PV
First you need to get the script to your XenServer Host.
1. Connect to your XenServer Hosts Console (via XenCenter or SSH)
2. move to your home directory
cd ~/
3. Get the makepv.sh script
wget http://wiki.ledhed.net/images/Makepv.sh
4. Now make the script executable
chmod +x Makepv.sh
5. Run the Script
~/Makepv.sh
Installing XS-Tools
The trick to installing XS-Tools on an Ubuntu based VM is to install the the BASH Shell, and reconfigure DASH.
sudo apt-get install bash
Bash was most likely already installed.
Now reconfigure DASH so that its not the default shell.
When asked if you want to install DASH as /bin/sh choose NO
sudo dpkg-reconfigure dash
Now that DASH is not the default shell, you can install XS-Tools from the iso.
In XenCenter Mount the xs-tools.iso as the VM's local DVD-Rom.
Mount the DVD in the Guest VM
sudo mount /dev/xvdd /mnt
now install according to your architecture (Though I've only been able to get this to work on amd64 VM's)
sudo dpkg -i /mnt/Linux/xe-guest-utilities_5.5.0-466_amd64.deb
You now have to make the xe-linux-distribution service run at the correct run level.
sudo update-rc.d -f xe-linux-distribution remove sudo update-rc.d xe-linux-distribution defaults
You can now reboot or run
sudo /etc/init.d/xe-linux-distribution start
XS-Tools should now be installed and running.
What to do if the VM doesn't boot after running Makepv.sh
xe vm-param-set uuid=<DEVICE_UUID> HVM-boot-policy="BIOS order" xe vm-param-set uuid=<DEVICE_UUID> PV-bootloader= xe vm-param-set uuid=<DEVICE_UUID> PV-args= xe vbd-param-set uuid=<VBD_UUID> bootable=false
You can get <DEVICE_UUID> by:
xe vm-list name-label=<VM_NAME>
You can get the <VBD-UUID> by:
xe vm-disk-list uuid=<DEVICE_UUID>
Graphical Console
The "Desktop" and "Alternate" distributions of Ubuntu boot into X11/Gnome. In order to access the Gnome session from XenCenter (rather than the CLI console) you need to enable VNC on Ubuntu and setup gdm to call vnc on display 0.
NOTE: Most tutorials involving gdm/VNC involve setting up xinetd, but if you have any packages that require openbsd-inetd (like LTSP) then you cannot install xinetd. Here is a link for running vnc as a service from openbsd-inetd.
Files
Reference HowTo in PDF
Ubuntu_10.04_XenServer_HowTo.pdf
XenServer Host Script for making a VM a PV.
Makepv.sh
References
PV / XS-Tools
http://www.bishopbarrington.net/wiki/howto/lucidonxenserver
Graphical Console for PV VM's
https://help.ubuntu.com/community/Xen#GNOME%20as%20domU%20guest
http://community.citrix.com/display/ocb/2008/07/02/Installing+Ubuntu+on+XenServer