Install-VMHostPatch

Synopsis

Updates the specified hosts.

Syntax

Install-VMHostPatch [-VMHost] <VMHost[]> [-HostPath <String[]>] [-WebPath <String[]>] [-LocalPath <String[]>] [-HostUsername <String>] [-HostPassword <SecureString>] [-HostCredential <PSCredential>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Detailed Description

Updates the specified hosts. The cmdlet installs on the host patches that can be located locally, on a web location, or in a host file system.
When using -LocalPath or -WebPath, the ESX/ESXi host attempts to store the patch contents in its local temporary directory. Because ESXi hosts have not enough free space on their local drives, this cannot apply to large size patches. The best practice for upgrading an ESXi host is to upload the patch contents on the host's datastore and to run Install-VMHostPatch with the HostPath parameter.
Depending on the component to be upgraded, you might have to set the host into a maintenance mode and to restart the host or the hostd management service after applying the patch.
Consider that this functionality is experimental.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
VMHostSpecify the hosts you want to update.truetrue (ByValue)
HostPathSpecify the ESX file system path to the patches you want to install.falsefalse
WebPathSpecify the web location of the patches you want to install.falsefalse
LocalPathSpecify the local file system path to the patches you want to install.falsefalse
HostUsernameSpecify the username you want to use to authenticate with the host.falsefalse
HostPasswordSpecify the password you want to use to authenticate with the host.falsefalse
HostCredentialSpecify the credentials you want to use to authenticate with the host.falsefalse
ServerSpecify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
RunAsyncIndicate that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync" in the vSphere PowerCLI console.falsefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse

Input Type

Return Type

VMware.VimAutomation.Types.Host.VMHostPatch

Notes

The cmdlet works only on ESX 4.0 and higher versions.

Examples

--------------  Example 1 --------------

C:\PS>Install-VMHostPatch -VMHost $vmhost1,$vmhost2 -LocalPath c:\esx40\patches\
ESX400-200906001\metadata.zip -HostUsername admin -HostPassword pass


Updates ESX servers using a local file. Before running the cmdlet, you must down
load the patch file locally and extract to a folder. The name of the folder must
 contain the patch ID (for example, "ESX400-200906001"). Providing credentials w
hen installing a patch from a local path is mandatory.




--------------  Example 2 --------------

C:\PS>$vmhost1 | Install-VMHostPatch -WebPath http://myInternalWebServer/esx40/E
SX400-200906001/metadata.zip


Upgrades an ESX server using a Web location. Before running the cmdlet, you must
 download the patch file and extract to a folder that is published on a Web serv
er. The patch URL address must contain the patch ID (for example, http://myInter
nalWebServer/esx40/ESX400-200906001/).




--------------  Example 3 --------------

C:\PS>$ds = Get-Datastore -Name "San1"

Copy-DatastoreItem c:\temp\ESX400-200906001\

$ds.DatastoreBrowserPath -Recurse

$vmhost1,$vmhost2 | Install-VMHostPatch -HostPath 
/vmfs/volumes/San1/ESX400-200906001


upgrades ESX servers using the -HostPath parameter. First, you must download the
 patch file and extract its contents to a temporary folder that is named after t
he patch ID (for example, c:\temp\ESX400-200906001\). Copy the folder in the roo
t folder of the San1 datastore and run Install-VMHostPatch providing the datasto
re path to the patch. Note that the datastore path is case-sensitive.

Copyright © 1998 - 2009 VMware, Inc. All rights reserved.