Patching an offline ESXi Host
Posted by JTV1703@reddit | sysadmin | View on Reddit | 19 comments
Quick question. I am need to patch my ESXi host. However, this host has the VM that is the router for the network. As soon as I place the host into maintenance mode, the internet will cut off. I have the patch zip file in the local host datastore. Will the following commands on the local console for the host work for patching?:
- Enter maintenance mode: vim-cmd hostsvc/maintenance_mode_enter
- Esxcli software vib update -d /vmfs/volumes/datastore/Updates/VMware-ESXi-7.0U3w-24784741-depot.zip
- reboot
- Vim-cmd hostsvc/maintenance_mode_exit
Vinez_Initez@reddit
Since you are touching the machine might as well upgrade to proxmox
xxbiohazrdxx@reddit
“Upgrade” lol
hasthisusernamegone@reddit
The process looks ok, but you know ESX 7 is end of life as of a couple of weeks ago, right? Any reason you're holding on that version?
Lower_Fan@reddit
I didn't know actually
hasthisusernamegone@reddit
Then I have bad news for you. https://blogs.vmware.com/cloud-foundation/2025/03/31/reminder-vsphere-7-to-reach-end-of-service-october-2-2025/
ESX 8 has been out for three years at this point, and 9 was released back in June.
yummers511@reddit
Still stuck with 6.7 in some places and I'm not sure upgrading the whole cluster even makes it into the top 5 priority list for this year. I've wanted to do it for a LONG while but lack management buy-in/agreement on it being a somewhat priority
Liquidfoxx22@reddit
I've always done a profile update as opposed to a vib update.
https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/esxi-upgrade-8-0/upgrading-esxi-hosts-upgrade/how-to-upgrade-hosts-by-using-esxcli-commands-upgrade/upgrade-or-update-a-host-with-image-profiles-upgrade.html#:~:text=If%20you%20are%20upgrading%20or,online%20depot%20on%20a%20private
JTV1703@reddit (OP)
This host is ESXi 7, so I believe the vib would work, right?
This mentions that you can use vib prior to 8.0.2
https://knowledge.broadcom.com/external/article?legacyId=2008939
Liquidfoxx22@reddit
It would, but I've always been told to use the profile update over a vib update - happy to be corrected/informed either way.
JTV1703@reddit (OP)
Gotcha, thanks for the info.
Professional-You2204@reddit
I asked AI
Your outlined commands for patching the ESXi host mostly follow the typical procedure with some important considerations.
Entering maintenance mode with the command:
vim-cmd hostsvc/maintenance_mode_enter
This is correct; you must put the ESXi host into maintenance mode before patching. However, if the host has a VM that acts as the network router and no other hosts or failover mechanism exists, placing the host into maintenance mode will shut down or suspend running VMs, causing your network outage. This cannot be avoided without migrating or failing over that VM elsewhere.Applying the patch using:
esxcli software vib update -d /vmfs/volumes/datastore/Updates/VMware-ESXi-7.0U3w-24784741-depot.zip
This command format is valid for updating ESXi using a patch zip file located on a local datastore. The path must be correct as/vmfs/volumes/<datastore name>/Updates/<zip file>
. Make sure you use the full path and correct datastore folder name. It's recommended to verify withesxcli software profile list --depot=...
and specify a profile when needed but your command works for vib updates.Rebooting the host with the
reboot
command is standard after patching.Exiting maintenance mode with:
vim-cmd hostsvc/maintenance_mode_exit
Is the correct final step after reboot and patch verification.Important Notes:
vmware -v
andesxcli software vib list
.In summary, your commands are technically correct for patching from the local datastore, but the network will cut off as soon as you enter maintenance mode due to the router VM being on the same host.
If avoiding downtime is critical, consider alternative methods like migrating that VM first or using vSphere features such as vMotion or live patching if your environment and patch type support it[1][2][3].
Citations: [1] Patching ESXi host using Command Line https://knowledge.broadcom.com/external/article/343840/patching-esxi-host-using-command-line.html [2] Comprehensive Guide to Installing VIB Files on ESXi https://www.nakivo.com/blog/instal-vib-files-on-esxi/ [3] How do I upgrade VMware ESXi without affecting uptime? https://falconcloud.ae/about/blog/how-do-i-upgrade-vmware-esxi-without-affecting-uptime/ [4] Patching ESXi Hosts : r/vmware https://www.reddit.com/r/vmware/comments/1hh2f56/patching_esxi_hosts/ [5] Place an ESXi Host in Maintenance Mode in the VMware Host ... https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-single-host-management-vmware-host-client-8-0/host-management-with-the-vmware-host-client-vSphereSingleHostManagementVMwareHostClient/place-a-host-in-maintenance-mode-in-the-vmware-host-client-vSphereSingleHostManagementVMwareHostClient.html [6] Patch Quicker with VMware vSphere Live Patch https://blogs.vmware.com/cloud-foundation/2024/07/11/vmware-vsphere-live-patch/ [7] See if ESXi Host Update Requires Maintenance Mode or Reboot https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/7-0/esxi-upgrade-7-0/upgrading-esxi-hosts-upgrade/upgrading-hosts-using-by-esxcli-commands-upgrade/determine-whether-an-update-requires-the-host-to-be-rebooted-or-to-be-in-maintenance-mode-upgrade.html [8] Putting the Controller VM and ESXi Host in Maintenance ... https://portal.nutanix.com/docs/vSphere-Admin6-AOS-v7_3:vsp-node-maintenance-vcenter-vsphere-t.html [9] Is it possible to use 'vib install' to install the critical security ... https://www.reddit.com/r/vmware/comments/1j49x46/is_it_possible_to_use_vib_install_to_install_the/ [10] How to Patch VMware ESXi https://www.bdrshield.com/blog/patch-vmware-esxi/ [11] Patching and Upgrading ESXi using ESXCLI commands https://virtualizationdojo.com/vmware/patching-upgrading-esxi-using-esxcli-commands/ [12] esxcli software vib command to patch & update ESXi https://www.youtube.com/watch?v=94g-t2DjqEw [13] Update ESXi Hosts by Using Zip Files - TechDocs https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/esxi-upgrade-8-0/upgrading-esxi-hosts-upgrade/how-to-upgrade-hosts-by-using-esxcli-commands-upgrade/update-esxi-hosts-by-using-zip-files-upgrade.html [14] Update to ESXi 6.7 Update 3 using ESXCLI https://www.bdrshield.com/blog/how-to-update-to-esxi-6-7-update-3-using-command-line/ [15] VMware - Upgrade ESXi Host with ESXCLI - CloudHosting FAQ https://www.cloudhosting.lv/eng/faq/VMware-Upgrade-ESXi-Host-with-ESXCLI [16] Manually Patching VMware ESXi 5.X with vCLI esxcli https://kb.firedaemon.com/support/solutions/articles/4000121623-manually-patching-vmware-esxi-5-x-with-vcli-esxcli
Professional-Heat690@reddit
yes, inline with other comments, fuck off. I'd fire you for this shit.
occasional_sex_haver@reddit
I miss the internet before ai garbage
5y5tem5@reddit
Don’t worry, my 5 to 10 year guess is that all the these systems will soon be fronted by some prompt interface with only “agents” having privileges/access to run the commands (and likely even the the knowledge of the commands which is proprietary and only baked into the model for the system,). Thus, effectively walling off admins who will only be able ask(beg?) for it to do something.
Which will make forums like this useless and no one will have a reason to post these kind of comments.
turbokid@reddit
Agreed. What use is this? They could have put it through AI themselves
xxbiohazrdxx@reddit
Fuck off
mahsab@reddit
TL;DR
Yes.
ender-_@reddit
I used to have a host like this, and back then I just installed the update without putting it to maintenance mode (this was on free ESXi in colo).
gwig9@reddit
You can do it offline logging into the server locally and then applying the patch through the zip file. I would recommend moving your router VM to another host using Vmotion, then upgrading the original host.