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

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck