sábado, 6 de julio de 2013

How to apply updates to a pool of Citrix XenServers using the xe CLI

Since this release there is a new License mode. XenServer 6.2.0 replaces the previous XenServer Free, Advanced, Enterprise, and Platinum editions. XenServer 6.2.0 no longer requires a license server or licence file to enable features, all features are enabled for free in unlicensed mode. Licenses are only required to receive Citrix Support and to enable the use of XenCenter for the installation of security and feature hotfixes. Hotfixes can continue to be installed on unlicensed hosts using the xe command line.

Requeriments
------------

1) A XenServer Pool configured
2) SFTP Client/ SCP Client installed in a client machine *
3) SSH client installed in a client machine **
4) The patch that you want to install ***

-------------------------------------------

* In this demo I'm using Ubuntu as client and I will use Filezilla as to upload the patch on XenServer

** I will use Terminal

*** I will install XS62E002. You can download from Citrix Site. 

-----------------------------------------------------------------

1) Uploading the patch to Pool

- Upload the update to the XenServer master pool usin SFTP client.
- Upload the update file to the pool you wish to update by running the following:

xe -s -u -pw patch-upload file-name=

Here, -s refers to the name of the pool master. XenServer assigns the update file a UUID, which this command
prints. Note the UUID.*

----------------------

* Once an update file has been uploaded to a XenServer host, you can use the "xe patch-list" and "xe patch-param-list" commands to view information about the file.

If XenServer detects any errors or preparatory steps that have not been taken (for example, VMs are running in the pool), it alerts you.

--------------------------------

2) Update the pool

- Get the UUID of the update file:

xe patch-list

Copy the "uuid ( RO)" value.

- Update the pool, specifying the UUID of the update file, by running the following:

xe patch-pool-apply uuid=

- Verify that the update was applied by using the "xe patch-list" command. If the update has been successful, the hosts field contains the host UUID.

- Perform any post-update operations, as necessary (such as, rebooting the hosts).


That's it.

Hasta la proxima, enjoy!!