Usually Xenserver is installed on a local harddisk. That and other disk(s) are used to store and run the Virtual Machines. This article is explaining how to create a bootable/runnable Xenserver on a USB stick. You save costs (harddisk and power) and gain on reliability.
What do you need?
1. A USB stick of 16GB or higher capacity (~EUR 13,00)
2. Xenserver installation CD/DVD (in this article is the Xenserver 6.0.2 installation CD used)
How do you make Xenserver run on a USB stick?
3. Disconnect all internal drives except the CD/DVD ROM player.
4. Plug the USB stick in the PC and boot from the Xenserver installer CD/DVD.
5. Install Xenserver on the USB stick. Check the device name of the USB stick on the size shown in the menus.
6. When ready reboot and start again from the Xenserver CD. Leave the USB stick in the PC
7. Issue the next command in the console:
# cat /proc/partitions
You get a list of disks. Note the disk with three partitions (e.g. sda, sda1, sda2 and sda3). Use the first partition of that disk (in this example /dev/sda1) for the next set of commands.
8. Issue the next set of command. Note: version numbers can differ:
# mkdir /target
# mount -t ext3 /dev/sda1 /target
# mount proc /target/proc -t proc
# mount sysfs /target/sys -t sysfs
# mount --bind /dev /target/dev
# chroot /target
# cd /boot
# ls –al
Check now the current filenames/versions and replace the accodingly filenames below.
# mv initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img.old
# mkinitrd --with-usb initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img 2.6.32.12-0.7.1.xs5.6.100.323.170596xen
# exit
# sync
# reboot
# mount -t ext3 /dev/sda1 /target
# mount proc /target/proc -t proc
# mount sysfs /target/sys -t sysfs
# mount --bind /dev /target/dev
# chroot /target
# cd /boot
# ls –al
Check now the current filenames/versions and replace the accodingly filenames below.
# mv initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img.old
# mkinitrd --with-usb initrd-2.6.32.12-0.7.1.xs5.6.100.323.170596xen.img 2.6.32.12-0.7.1.xs5.6.100.323.170596xen
# exit
# sync
# reboot
9. Remove de Xenserver installation CD/DVD and configure the BIOS to boot from the USB stick.
Source: http://support.citrix.com/article/CTX130111
UPDATE (6-Oct-2012): XenServer 6.1 upgrade:
Boot from the XenServer 6.1 installation media and select the Upgrade option.
Execute the Upgrade and reboot from XenServer 6.1 installation media again
Issue the commands above, remove the XenServer 6.1 installation media and you have completed the XenServer 6.1 upgrade to USB boot device.
UPDATE (4-Aug-2013): XenServer 6.0.2 to 6.2.0 upgrade:
I made a 'dd' copy from the old Xen 6.0.2. memory stick since I wanted to replace the Xen 6.0.2 USB stick anyway. Reason for that is that Xen regularly read/write to the USB stick and I do not know how much. Writing (much) will 'wear and tear' the flash memory to a point that it won't accept new writes.
I used the copied stick for a plain-vanilla upgrade that worked well. I re-applied the USB boot support and everything is running fine on Xen Server 6.2 again