Updating vCenter Server appliance from an ISO without access to the cd-drive

Normally updating a vCenter server appliance is as simple as accessing the VAMI interface on port :5480 and have the appliance download it's own update form the default update URL. And when that's not possible you can always just download the ISO-file and mount that on your vCenter server appliance.

But what if you don't have access to the vCenter Sever appliance virtual machine controls and you do want to update from that ISO file? There's a way to mount the ISO file on the symbolic link where the vCenter Server software normally checks for the contents of the ISO-file.

It all starts with downloading the vCenter update ISO-file and placing it on a Windows-share (or an NFS-share). (It would of course be possible to copy the .ISO file to the vCenter Server appliance's disk but it's a rather large file so I would prefer to keep it outside of the appliance.) Next mount that share on the vCenter Server appliance, mount the ISO-file as a loop-device while it remains on that share and then create a new cd-rom player symbolic link to the loop-device. The end result is that the update software looks at /dev/sr0 and sees it as a cd-rom drive with the ISO-file mounted. 

Here are the steps to do what I have just described:

Mount the Windows share (or NFS export) where you have placed the ISO file:

mount -t cifs //<serveraddress>/<sharename> 
                             -o username=<username> /<mountpoint>

The vCenter Server appliance should contain the package to mount a Windows CIFS share but if not that package can be installed with the Photon OS Package Manager tdnf:

tdnf -y install cifs-utils

Mount the update ISO file as a loop-device

mount -o loop /<path-to-iso-file>  

Rename the original sr0 device (which is what the cd-rom device points to) to something else and create a new one that points to the loop-device. Use command ls /dev/loop* to find out what your loop-device is, in my case and in the example below it was loop0.

mv /dev/sr0 /dev/sr0.org

ln /dev/loop0 /dev/sr0 

Now when the software installed reads the contents of the vCenter Server appliance's cd-rom drive it will find the contents of the ISO file there.


Follow us on LinkedIn




Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer