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/<update file>

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=<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!

XenCenter Install Updates window

XenCenter Install Updates window

Advertisements

14 thoughts on “Applying Hotfixes on Citrix Xenserver 6.2 hypervisor without XenCenter

  1. A script to automatically download the patch files and apply them would be cool. Does patch-pool-apply have to read the files from a directory on a xenserver (i.e., /var/tmp), or could I have the files on my storage box? I guess I’d have to mount the share, right?

    Also, could I run the command from my XenCenter machine, providing the host-uuid param for the pool master?

    OT, I’m going to attempt an 5.6SP2 –> 6.2 RPU this weekend.. Caveats? Wish me luck!

  2. I haven’t tried the script yet, but the rolling pool upgrade worked nicely, after which I manually patched. Now I see there’s another patch available – perhaps I’ll try the script this time.

  3. Thank you for this article as it was super simple to follow! I’m a bit of scripting nerd 🙂 so here’s a slightly easier command than having to mess around with GUID’s:

    xe patch-pool-apply uuid=`xe patch-upload file-name=/var/tmp/XS62E005.xsupdate`

    Those are tick signs (where tilde key is, next to 1 on top of the keyboard) which mean EXECUTE this command inside of the ticks and feed the output to initial command. This way you never even see the GUID as it’s done under the hood.

    All the best!

  4. Pingback: First time (and second time…) Citrix XenServer install | Andrew's Blog

  5. Pingback: How to Upgrade XenServer: The Complete Guide | Mike Graham - Tips and Tricks for the world of IT

  6. I meet a error when run that script “Getting host list using: /opt/xensource/bin/xe host-list name-label=`grep “^HOSTNAME=” /etc/sysconfig/network | awk -F= ‘{print$2}’` params=uuid –minimal
    Detected HOST UUID:
    Error: Failed to obtain HOSTUUID from XE CLI”

    Help me

  7. Nice article. I have a xenpool that has two hosts are running. xenserver 6.2. Without patching and reboot all hosts at once, is it possible to patch one server, reboot, then migrate the VMs into the patched host, then patch the 2nd host? If this is possible, do I need to patch xenpool master first, or can I do the 2nd host first, then pool master last?
    What is proper way to do this without bring down the VMs and patch the hosts?
    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s