I can't seem to set vhv.enable=TRUE. I have another property with the same code that will set (I checked the vmx file) but vhv will not.
System.getModule("foo").setProperty(vm, "vhv.enable", "TRUE");
System.getModule("foo").setProperty(vm, "featMask.vm.hv.capable", "Min:1");
When I check the vmx file, vhv is not set but the featMask is. Any help would be appreciated.
Orchestrator 5.5.0 - 1281930
ESXi 5.5u1
Hi
If you using powercli the below example should do the trick for you. I assume you are using a ESXi 5.1 or 5.5 physical server.
$config = New-Object VMware.Vim.VirtualMachineConfigSpec
$config.nestedHVEnabled = $true
This will populate the .vmx file with the vhv.enable = true line
(Note this is just a extract of my code)
OK, let me drill down the code a bit.
The setVMProperty action does:
var spec = new VcVirtualMachineConfigSpec();
spec.extraConfig = new Array(new VcOptionValue());
spec.extraConfig[0].key = name; // in my example, this is vhv.enable
spec.extraConfig[0].value = value; // in my example, this is TRUE
var task = virtualMachine.reconfigVM_Task(spec);
return task;
Can you check with Onyx what API calls really should happen when you try to set these options using vSphere Client?
It might be the case that you somehow have to specify the type of the value as well (perhaps comparable to ESXi host options). Some links:
mighty virtualization: vCO - what´s up with VcOptionValue?
Re: set host advanced settings from vco
Cheers,
Joerg
Nope. C# client cannot set it either. I can only set it using the Web Client (Expose hardware assisted virtualization), which is how I found it in the first place (checking the changes in the vmx file).
Thanks,
Carl L.
Well, do to no solution ... I took the back door. I used the ssh plugin to ssh into the host and add the vhv.enable manually. Then refreshed the VM config. Works like a charm but is a whole lot more complicated!
Carl L.
Hi
If you using powercli the below example should do the trick for you. I assume you are using a ESXi 5.1 or 5.5 physical server.
$config = New-Object VMware.Vim.VirtualMachineConfigSpec
$config.nestedHVEnabled = $true
This will populate the .vmx file with the vhv.enable = true line
(Note this is just a extract of my code)
That was it! I was looking for VHEnabled, not nestedVHEnabled. Works like a charm!
Thanks so much!
Carl L.