Posts Applying XenServer Patches
Post
Cancel

Applying XenServer Patches

For better performance and security it’s recommended to install all patches released by XenServer. In this article I would like to share the steps for applying patches on XenServer and XenServer pool


Ref following Citrix Article to get list of recommended patches for your XenServer Version.

1
https://support.citrix.com/article/CTX138115`


Single XenServer Host


If you’re running XenServer on a single hardware node, following steps can be used to install patches.


1. Download Hotfix from Citrix Downloads Portal

2. Unzip Hotfix

1
unzip patchxxx.zip

3. Get Host UUID

1
xe host-list

4. Upload hotfix

1
xe patch-upload file-name=<patchxxx.xsupdate>   

5. Apply patch

1
xe patch-apply uuid=<patch UUID step 4>  host-uuid=<host UUID step 3>



XenServer pool


If you’re running a XenServer Pool with shared storage, maintenance for a hardware node will not affect the running VMs. You can issue xenmotion to migrate VMs from one server to another when one servers is going to reboot.

In this case, you should download patches to your pool master and apply patches to the entire pool using patch-pool-apply command. Then evacuate and reboot hosts starting from pool master.


Steps for Installing patches in XenServer pool are as follows.


1. Take pool database backup

1
xe pool-dump-database file-name=pool-database-backup_`$date +%F`

2. Disable pool HA

1
xe pool-ha-disable

3. Eject all CD Drives (mounted to the VMs)

1
xe vm-cd-eject –multiple

4. Download hotfixes to pool master /root/hotfix/

5. Apply Hotfixes

6. Perform post install actions

Reboot Hosts / restart tool-stack based on the guidelines provided while applying patch.


Applying patches

You can either use xe patch-pool-apply from the Pool master or use this script to upload and apply patches.

1
xe patch-pool-apply uuid=<patch UUID >  


Script usage:-


  • Download the script and save /root/hotfix/apply-hotfix.sh
  • Set permissions for the script chmod +x /root/hotfix/apply-hotfix.sh
  • Apply Patches ./apply-hotfix.sh <patch.xsupdate>


This will upload and apply patches on all pool members. Once finished, you may evacuate and reboot pool members starting from the pool master or restart tool-stack as instructed while applying the patch.

Happy Upgrade 🙂

This post is licensed under CC BY 4.0 by the author.