We are trying to move our ESXi 4.1 scratch config to the local drive via PowerCLI. Has anyone done this successfully and can tell me what is wrong with the code below.
$ESXHost = "<esxhostname>"
Get-VMHost $ESXHost | Set-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/($ESXHost)-local/scratch"
error:
Set-VMHostAdvancedConfiguration : 3/17/2011 10:38:28 AM Set-VMHostAdvancedConfiguration A specified parameter was not correct.
At C:\Users\tclavell\AppData\Local\Temp\f8e3ef60-5223-4ec6-a0ad-1e46f1aaffad.ps1:3 char:54
+ Get-VMHost $ESXHost | Set-VMHostAdvancedConfiguration <<<< -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/($ESXHost)-local/
scratch"
+ CategoryInfo : NotSpecified: (:) [Set-VMHostAdvancedConfiguration], InvalidArgument
+ FullyQualifiedErrorId : Client20_MoServiceImpl_Invoke_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostAdvancedConfiguration
version:
PowerCLI Version
----------------
VMware vSphere PowerCLI 4.1 U1 build 332441
---------------
Snapin Versions
---------------
VMWare vSphere PowerCLI 4.1 U1 build 332441