Avatar of lipotech
lipotechFlag for United States Minor Outlying Islands

asked on 

How to update ESXi 6.5 patch using ESXCLI within PowerShell?

Trying to update ESXi 6.5 Patch using ESXiCLI within powershell.  My path is pointing to a subfolder in datastore called MasterImages.  

This is the the path name -  /vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip

Commands being executed:
$argsInstall = $esxcli.software.profile.update.createargs()
    $argsInstall.depot = $patchfilepath
    $esxcli.software.vib.update.Invoke($argsInstall)

Below is the error received:

Message: EsxCLI.CLIFault.summary;
InnerText:  [MetadataDownloadError] Could not download from depot at
zip:/vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip?index.xml, skipping
(('zip:/vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip?index.xml', '', "Error extracting index.xml from
/vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip: [Errno 2] No such file or directory:
'/vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip'"))        url =
zip:/vmfs/volumes/MasterImages/Patches/ESXi650-20210704001/ESXi650-20210704001.zip?index.xml Please refer to the log file for more
details.EsxCLI.CLIFault.summary
At line:176 char:5
+     $esxcli.software.vib.update.Invoke($argsInstall)}
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], MethodFault
    + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.MethodFault


 I was able to make an ESX7.0.1 update using $esxcli.software.vib.update.Invoke($argsInstall) but with 6.5 this also returns an error "not able to download from depot".

VMwarePowershell

Avatar of undefined
Last Comment
Hello There
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Hello There
Hello There

Well, I prefer this way. Place the offlinebundle.zip on a datastore, enable SSH on the host, connect to it via Putty, enable maintenance mode (you need to migrate VMs or shut them down), and run these two commands (according to the .zip file version). It will upgrade and reboot the host.
esxcli software profile update -p ESXi-7.0U1-xxxxxxxx -standard -d /vmfs/volumes/datastore1/VMware-ESXi-7.0U1-xxxxxxxx-depot.zip
reboot

Open in new window

VMware
VMware

VMware, a software company founded in 1998, was one of the first commercially successful companies to offer x86 virtualization. The storage company EMC purchased VMware in 1994. Dell Technologies acquired EMC in 2016. VMware’s parent company is now Dell Technologies. VMware has many software products that run on desktops, Microsoft Windows, Linux, and macOS, which allows the virtualizing of the x86 architecture. Its enterprise software hypervisor for servers, VMware vSphere Hypervisor (ESXi), is a bare-metal hypervisor that runs directly on the server hardware and does not require an additional underlying operating system.

39K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo