Tuesday, February 4, 2014

Applying Hotfixes on Citrix Xenserver 6.2 hypervisor without XenCenter

Citrix Xenserver is a beautiful open source (from 6.2 edition and later) hypervisor that tries to grab as much as possible market share on virtualization/cloud world. It carries many years of development efforts by Citrix, many well established implementations and a broad support community.
XenMotion, High Availability and all the great features of Xenserver are available on the licensed and unlicensed versions of the hypervisor. The licensed version includes automated patches and updates through XenCenter console and 24×7 Citrix Technical Support. On the unlicensed version, the administrator should apply the xenserver patches by himself through an ssh console. XenCenter still notifies the availability of new patches.
So, on XenCenter when you goto Tools – Install Updates, you get grayed out options like this
XenCenter Upadtes Installation
XenCenter Upadtes Installation
So, first of all we should download the new patches from Citrix webserver, XenCenter will help you to do so. Then unzip the contents of the downloaded files and secure ftp them on XenServer.
Ftp the updates to XenServer
Ftp the updates to XenServer
I use filezilla to sftp the updates to XenServer in binary transfer mode and upload them to /var/tmp directory. Then ssh to XenServer (I use putty utility to do so but you can use anything you are comfortable with). Login as root and run the following command
xe patch-upload file-name=/var/tmp/
this command produces a uuid alphanumeric string. Copy it to the clipboard and on XenCenter notice the yellow down icons that appear, indicating that a hotfix or update exists but has not been applied.
XenCenter warning icon
XenCenter warning icon
Run
xe patch-pool-apply uuid=
pasting the uuid string. You may verify the applied patches by running
xe patch-list
Verifying patches
Verifying patches
If the update has been successful, the hosts field should contain the uuids of all the hosts in the pool. Finally, run
xe-toolstack-restart
to reload the toolstack on all hosts, you may loose the connection if you run it on Pool Master.
Applying Patches
Applying Patches
Now, your XenServer is patched!