VMwareconverter
Contributor
Contributor

Failed to Update ESXi 4.1 Host via PowerCLI see option3

Jump to solution

Hi,

I have a test environment before going to Production two ESXi410 installed server (ESXi-1 and ESXi-2)

Option1: On ESXi-1 I have vCenter and update manager. As per the documentation I tried to use update manager add-in to the vcenter. That went fine to update the ESXi-2 host with ESXi410-201011001.zip.

No I was in fix for how to install the update on the ESXi-1 which has update manager. As I have to shut down the VM and put the ESXi-1 in Maintenance mode.

Option2: Enabling Local Tech Support and Remote Tech support (SSH). In this way I copied the update file to ESXi-1 Datasource using Putty. But the Command esxupdate did not find the file given in the filepath (/vmfs/volumes/datastore1/filename.zip). Then I copied it to /var/tmp/cache and used command esxupdate --bundle=filename.zip update. This as well worked fine.

But the thing I read in your documentation to use Install-VMHostPatch did not help me.

Option 3: from the vSphere PowerCLI.>Install-VMHostPatch -VMHost IP -HostPath /var/tmp/cache/ESXi410-201011001.zip -Server IP -Confirm

gave me error 5 OSError No such file or directory.

Again I tried to change the path to datastore:

PowerCLI>Install-VMHostPatch -VMHost IP -HostPath /vmfs/volumes/datastore1/ESXi410-201011001.zip

Please find attached error's in image file.

I want to use this PowerCLI to update the Host's and VM's. Vmware has no proper documentation on this.

Please help.

Mohammed Ali Rizwan

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal

Hi there,

Install-VMHostPatch will work for you only if you want to update ESX hosts, it won't help you for VMs. There's another powershell snap-in called VUM PowerCLI that you can download from here http://vmware.com/go/powercliupdate. If you want to use that snap-in you should have properly installed VUM server.

Now about your current issue. The answer that Luc wrote should work for you. In this example there's a step that manually uploads patch's files. The reason for doing that is the small partitions sizes on ESXi and usually there's no enough space to upload large patch in the ESXi temporary folder.

Actually you can benefit of this approach - if all your ESXi boxes are linked to shared storage you can upload the patches on this storage once and after that upgrade them one by one.

Regards,

Vitali

PowerCLI Team

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership

The Install-VMHostPatch cmdlet requires  that the foldername corresponds with the name of the patch.

You seem to have the name in the file but not in the folder.

See Example 1 in the documentation.

In Example 3 you have a complete script that copies the patch from your PC to the datastore and then applies the patch.

But watch out for the linebreaks, the example should say

$datastore = Get-Datastore -Name Datastore

Copy-DatastoreItem c:\temp\ESX400-200906001\ $datastore.DatastoreBrowserPath -Recurse

$host1,$host2 | Install-VMHostPatch -HostPath /vmfs/volumes/datastore/ESX400-200906001/metadata.zip


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
admin
Immortal
Immortal

Hi there,

Install-VMHostPatch will work for you only if you want to update ESX hosts, it won't help you for VMs. There's another powershell snap-in called VUM PowerCLI that you can download from here http://vmware.com/go/powercliupdate. If you want to use that snap-in you should have properly installed VUM server.

Now about your current issue. The answer that Luc wrote should work for you. In this example there's a step that manually uploads patch's files. The reason for doing that is the small partitions sizes on ESXi and usually there's no enough space to upload large patch in the ESXi temporary folder.

Actually you can benefit of this approach - if all your ESXi boxes are linked to shared storage you can upload the patches on this storage once and after that upgrade them one by one.

Regards,

Vitali

PowerCLI Team

0 Kudos
VMwareconverter
Contributor
Contributor

Hi there,

Thanks Yes, it did matter to use the folder name as the Patch name. Also the patch must be unzipped before uploading it to the datastore. make sure that the metadata.zip file is aswell present in the folder.

The command I used is @PowerCLI>Install-VMHostPatch -HostPath /vmfs/volumes/datastore1/ESXi410-201010001/metadata.zip

But can I know what is the reason to use the file name as folder name?

Mohammed Ali Rizwan

0 Kudos