How to perform Citrix XenServer update via CLI?

I prefer running via CLI so this blog will teach you how to perform Citrix XenServer update via CLI. This also requires a basic knowledge of using Citrix XenCenter. You can refer the GUI method at the reference.


  1. If you have the XenCenter version lower then 7.1 then please upgrade it else you will not see what are the Needed updates required for the XenServer.
  2. Never ever put your pool master host in maintenance mode (You will be having other pool that has higher level)
  3. Always perform updates at the pool master level first


Pool =  Host


  1. Identify what are the updates needed for each pool
  2. Download the updates from Citrix portal, make sure you have Citrix account to verify yourself
  3. Extract the updates zip file
  4. Download WinSCP (SFTP/FTP tool) and install
  5. Identify your Pool master (You can find it at the XenCenter Interface > Pool Master >  General)
    • Usually, the pool master is the top host
  6. Identify your pool master’s local storage, whether is enough for updates to be store
  7. Migrate VMs in the pool master to another host (this may have downtime)
    • If you don’t have other hosts, then no choice, and may need to bear with the downtime
  8.  Restart your pool master
    • Perform this restart is to make sure that the pool master is alright (If got problem, please raise a case to Citrix Support)
  9. Reconnect to your pool
  10. Open your WinSCP
  11. Connect your WinSCP with the pool master management IP address (You can find it at XenCenter > Pool Master > General > Network) and key in the credential
  12.  Copy and paste the updates to the pool master storage
    • You only need to perform this ONCE at pool master only
  13.  Go to XenCenter > Pool Master > Console
  14.  You will see a CLI Console
  15. Type in the password
  16.  Then Type the following commands

#below this command Is provide a list of the updates filename

> ll

#below this command is to upload the update to the main database using the update filename and it will generate the uuid of the update. Make sure to copy & paste & save the uuid somewhere in a notepad or OneNote, if you will be performing updates more than one host. You can repeat this command for different updates then only moving forward to the apply command. No need to repeat this command for other host, only repeat if necessary.

> xe patch-upload file-name=xxxx.xsupdate

#below this command is to apply the update using the host’s uuid and the filename uuid

> xe patch-apply host-uuid=xxxx uuid=xxxx
UUID > is the unique Identity of the update
Host-UUID > is the host unique id which you can find it from the XenCenter > Host > General

16. After that, then restart your host/pool master

17. Migrate the VM back to the host

18. Monitor it for 24 hours

19. The End

*Try not to get it wrong with the unique identity

*If you are performing for other host updates too, sometime you will receive an error about the applying action rejected (because some update patches have clear command inside), no need to panic, just re-upload the update using the upload command (patch-upload).

*You can patch the updates for other hosts by running on the same console. Example,  Run updates for Pool_02 via Pool_01(Pool Master) console. Easier for you, from changing different host console.