Hi,
I want to change the power.CpuPolicy from "static" to "dynamic" and vice versa with the JAVA API so once I am connected to my ESX 4.0 host:
//HostCpuPowerManagementInfo
HostHardwareInfo hinfo= host.getHardware();
HostCpuPowerManagementInfo hinfo_cpu = hinfo.getCpuPowerManagementInfo();
String cpu = hinfo_cpu.getCurrentPolicy();
String cpu2 = hinfo_cpu.getHardwareSupport();
System.out.println("cpu_policy:"+cpu);
System.out.println("techno:"+cpu2);
//setCurrentPolicy(java.lang.String value)
String policy = "static";
hinfo_cpu.setCurrentPolicy(policy);
String cpu3 = hinfo_cpu.getCurrentPolicy();
System.out.println("cpu_policy_after:"+cpu3);
The result seems to be okay:
cpu_policy:dynamic
techno:Enhanced Intel SpeedStep(R)
cpu_policy_after:static
But in the vCenter interface, the status of this property has not change... I am logged as root so I don't think that this is a permission problem, maybe the syntax...Any ideas?
Thanks in advance,
Syl