I came across a need to install multiple patches manually (via SSH) on one of my xenservers. It’s quite tedious to do this manually so I found a way to here.)
Download all the patch .zip files to a directory your xenserver can access. Then, extract them all with this command:
find *.zip -exec unzip {} \;
Next, upload all the .xsupdates:
find *.xsupdate -exec xe patch-upload file-name={} \;
This spits out a bunch of UUIDs. Make note of these. You will also need to get your host-uuid by using the
xe host-list
command.
Lastly, a quick for loop applies the patches we want (replace the UUIDs with those of the patches uploaded earlier and the host-uuid with yours)
for file in c3520494-be00-4133-afb3-adf8ab5edb11 7fea2d85-7ce1-428c-a92f-57e37551d6f1 d9862b7f-9be6-4672-b9a8-4f52f776fd03 a424dfe5-8be8-4bd6-a49e-62620e369a43 e28bb0ae-e43f-46d9-9147-c7dc712508eb; do xe patch-apply uuid=$file host-uuid=46f8ef28-8ee1-44b5-967c-b8e48585094b; done
That did the trick for me. After applying the patches I came across this post which appears to have a much better script. Whatever works.