Trying to use the code below to update Hot Add on VMs in 6.7U3 vCenter but changes not saved. Task shows complete but no changes made to either powered off VMs or when shutting down / starting up (power off / power on). ESXi hosts are also 6.7U3. VMs are RHEL6/7 with hardware version 10 & Windows 2012R2, 2016 with hardware version 11. The code has been used successfully many times on 6.5.
$vmConfigSpec=New-ObjectVMware.Vim.VirtualMachineConfigSpec
$extra1=New-ObjectVMware.Vim.optionvalue
$extra1.Key="mem.hotadd"
$extra1.Value="true"
$vmConfigSpec.extraconfig+=$extra1
$extra2=New-ObjectVMware.Vim.optionvalue
$extra2.Key="vcpu.hotadd"
$extra2.Value="true"
$vmConfigSpec.extraconfig+=$extra2
$vm.Extensiondata.ReconfigVM($vmConfigSpec)
Thanks in advance