I am trying to enable CPU and Mem hotplug on a newly deployed VM and I am getting the following error. It's powered off
PS C:\WINDOWS\system32> $VM="DEV999-test"
PS C:\WINDOWS\system32> $spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.CpuHotAddEnabled = $true
$spec.MemoryHotAddEnabled = $true
$VM.ExtensionData.ReconfigVM($spec)
You cannot call a method on a null-valued expression.
At line:4 char:1
+ $VM.ExtensionData.ReconfigVM($spec)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> Get-PowerCLIVersion
WARNING: The cmdlet "Get-PowerCLIVersion" is deprecated. Please use the 'Get-Module' cmdlet instead.
PowerCLI Version
----------------
VMware PowerCLI 12.2.0 build 17538434
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.3 build 17838947
VMware Cis Core PowerCLI Component PowerCLI Component 12.3 build 17839331
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.3 build 17839688
What am I doing wrong ?
Thks
Gaetan