VMware Cloud Community
boogieshafer
Expert
Expert

[SOLVED]is there an easier way to update from cli now that esxupdate is gone?

hello vmware gurus,

now that esxupdate is deprecated (RIP), i'm looking for a more convenient way to scan/stage/update vsphere 5.x using only the command line like i was able to do in 4.x. obviously this is for non-vcenter/update manger setups where that mechanism is *not* available)

specifically, i havent yet been able to figure out how to get the vsphere 5.x host to scan against the vmware public repositories using the "esxcli software" mechanisms.

without the ability to scan from the host i have to manually do patch searches and then manually stage them using wget and then apply them individually (alot more work, and prone to error than the 4.x esxupdate process i was using where i could use the same tool for all of it)

i did find that the vmw-ESXi-5.0.0-metadata.zip file exists for 5.x, but it doesnt seem like esxcli knows how to use it

https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-esx-index.xml

https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-ESXi-5.0.0-metadata.zip

https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-ESXi-5.0.0-notification.zip

anybody figure out how to update their standalone hosts directly against the vmware repos?

update to 5.0 Update 1 + April tools update via cli (the more painful method)

# to scan/stage: get the URLs for the updates from http://www.vmware.com/patchmgr/findPatch.portal

# NOTE: wget on ESXi cant use https://... which is how the URLs come out of the patch portal, edit to http://...

cd /scratch/downloads

wget http://hostupdate.vmware.com/software/VUM/OFFLINE/release-328-20120312-212851/update-from-esxi5.0-5....

wget http://hostupdate.vmware.com/software/VUM/OFFLINE/release-331-20120408-206167/ESXi500-201204001.zip

# to update:

vim-cmd hostsvc/maintenance_mode_enter

esxcli software vib install -d /scratch/downloads/update-from-esxi5.0-5.0_update01.zip

esxcli software vib install -d /scratch/downloads/ESXi500-201204001.zip

vim-cmd hostsvc/maintenance_mode_exit

reboot

# to clean up:

rm /scratch/downloads/update-from-esxi5.0-5.0_update01.zip

rm /scratch/downloads/ESXi500-201204001.zip

scan/stage/update process for 4.1 via cli (simple/effective/reliable)

esxupdate -m https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-ESXi-4.1.0-metadata.zip scan

esxupdate -m https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-ESXi-4.1.0-metadata.zip stage

vim-cmd /hostsvc/maintenance_mode_enter

esxupdate -m https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vmw-ESXi-4.1.0-metadata.zip update

vim-cmd /hostsvc/maintenance_mode_exit

reboot

Reply
0 Kudos
1 Reply
boogieshafer
Expert
Expert

never fails that i figure something out right after i post Smiley Wink

looks like the https://.. that worked under 4.x is failing as outbound tcp443 is blocked by default

changing over to http://.. looks like im getting somewhere

Scanning/Updating 5.x from CLI (improved method)

# to get a listing of whats in the vmware repo and compare to the local host

# (following command is a single line)

esxcli software sources vib list -d http://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep Update

# to apply updates directly from vmware repo

vim-cmd hostsvc/maintenance_mode_enter

# (following command is a single line)

esxcli software vib update -d http://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

# NOTE: the command above offers no progress indication while it works

# -> to see more of what is happening, open 2 other consoles

# ---> console 2: tail -f /var/log/syslog.log

# ---> console 3: tail -f  /var/log/esxupdate.log

vim-cmd hostsvc/maintenance_mode_exit

reboot

--

use this process at your own risk, as vmware certainly isnt calling it out in their docs

Message was edited by: boogieshafer (clarified longer commands are 1 liners)

Reply
0 Kudos