Installation guide
Maintenance Procedures
21
Procedure B.3. To apply an update to a XenServer Host or XenServer Host
pool using the CLI
1. Download the update to a local directory. Note the path to the update file you have down-
loaded. (It is also possible to download the update directly to an appropriate location on the
server, e.g. /root, using standard Linux commands, but it is usually best to download it
to a remote client.)
2. Upload the update to your server or pool. An example CLI command to do this might be:
$ xe -s my_server -u root -pw root_password patch-upload \
file-name=update_file b89249c7-feba-41c5-8838-911ded969add
Here, the -s -u, and -pw options refer to the server, the username (which would usually be
root), and the password, as usual - these would be omitted if running the command directly
from the XenServer Host console.
Once you have executed the above command, you will be given the UUID of the uploaded
update. This UUID will be used to specify the update that is to be applied.
3. Be sure to follow any guidance regarding the update before continuing, in particular any
information provided about whether VMs should be moved away from the server or that the
server should be restarted after applying the update. As always, we recommend taking ap-
propriate backup measures before making modifications to system software. To automati-
cally move VMs to other servers, you can make use of the host-evacuate CLI command.
4. Apply the update to the pool. A command like the following may be used to do this:
$ xe patch-pool-apply uuid=b89249c7-feba-41c5-8838-911ded969add
This will apply the update to all servers in the pool. Alternatively, if you need to restart servers
and perform the update in a rolling manner, you can apply the update to an individual server
by running a command like the following:
$ xe patch-apply host-uuid=ebf17583-d8c5-4835-999a-e0a29716207d \
uuid=b89249c7-feba-41c5-8838-911ded969add
5. Verify that the update was applied by using the patch-list command again. Now the hosts
field should contain the host UUID.
After an update is applied to a XenServer Host, a small file containing the same information stored
on the master from the xe patch-upload command is written to a subdirectory of the machine's
patch directory. This enables XenServer Hosts later ejected from the pool to repopulate their
databases with information about updates already applied.
To save space on the master, large updates can be deleted from disk using the xe patch-clean
command. (The update information stored in the master's database, though, is always retained.)
These updates can be uploaded again using xe patch-upload if required.
B.3. Reinstalling the same version