Showing posts with label Update Manager. Show all posts
Showing posts with label Update Manager. Show all posts

Friday, April 19, 2013

Update Manager 4.1 failed to remediate


I came across another nice puzzle after updating one of our customers' vCenter and Update Manager to 4.1U3 (yeah, some customers hold off on updating forever, I know..): When trying to update some ESX hosts attached to the vCenter, I got the following failure:

The host returns esxupdate error codes: 7. Check the Update Manager log files and esxupdate log files for more details

The logfiles contained the following info:

Remediation did not succeed for XXXXesx01: SingleHostRemediate: esxupdate error, version: 1.30, operation: 7: ('http://XXXX:9084/vci/hostupdates/hostupdate/vmw/vibs/cross_oem-vmware-esx-drivers-net-vxge_400.2.0.28.21239-1OEM.vib', '/var/cache/esxupdate/3375545638666279871', '[Errno 14] HTTP Error 404: Not Found') . error 4/11/2013 3:18:13 PM 

This error turned out to be because of a known error. Apparently pre-Update Manager 4.1U2, the webserver serving the patches was case insensitive, and from U2 on, it was made case-sensitive. However, certain patches that were previously downloaded before, were stored case-insensitive, but they were supposed to be case sensitive.

The KB article is here: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2011656

Because redownloading at this moment was not an option, we had to rename the files to be with the proper case sensitivity. The files are fortunately not that many:

From:
  • bind-libs-9.3.6-4.p1.el5_5.3.i386.vib 
  • bind-libs-9.3.6-4.p1.el5_5.3.x86_64.vib 
  • bind-utils-9.3.6-4.p1.el5_5.3.x86_64.vib 
  • bind-libs-9.3.6-4.p1.el5_5.3.i386.vib 
  • cross_oem-vmware-esx-drivers-net-vxge_400.2.0.28.21239-1oem.vib 
  • cross_oem-vmware-esx-drivers-scsi-3w-9xxx_400.2.26.08.036vm40-1oem.vib 
  • vmware-esx_swmgmt_provider-4x.1.0.1-1.4.348481.vib

To (note the bold typeface):
  • bind-libs-9.3.6-4.P1.el5_5.3.i386.vib 
  • bind-libs-9.3.6-4.P1.el5_5.3.x86_64.vib 
  • bind-utils-9.3.6-4.P1.el5_5.3.x86_64.vib 
  • bind-libs-9.3.6-4.P1.el5_5.3.i386.vib 
  • cross_oem-vmware-esx-drivers-net-vxge_400.2.0.28.21239-1OEM.vib 
  • cross_oem-vmware-esx-drivers-scsi-3w-9xxx_400.2.26.08.036vm40-1OEM.vib 
  • vmware-esx_swMgmt_provider-4x.1.0.1-1.4.348481.vib 




Thursday, August 2, 2012

Getting an overview of patches for your ESX hosts

A customer asked for an overview of which patches exactly were needed for his ESX hosts. He wanted to review the patches before they were applied with Update Manager. Unfortunately, you can't get the list from the gui in a nice way, so some PowerCLI goodness was needed.

First off, you need to have the Update Manager cmdlets installed to be able to use the Get-Compliance cmdlet in the code.

The following script will go over each host, and output the severity, patch ID, release date, additional info (a link to the kb article) and a short update to what the patch is for.

It will look something like this:
HostSecurity,ESX410-201204402-SG,"4/26/2012 10:00:00 AM","For more information, see http://kb.vmware.com/kb/2014988.","Updates libxml2"

Now for the code itself:

ForEach ($HostToCheck in Get-VMHost){
$Details = Get-Compliance $HostToCheck -Detailed| Select -ExpandProperty NotCompliantPatches| Select @{N="Hostname";E={$HostToCheck}}, Severity, IdByVendor, ReleaseDate, Description, Name

$ComplianceResult += $Details
}

$ComplianceResult | Export-CSV -Path c:\NeededPatches.CSV -NoType