Hello,
Does anybody have an idea on what are the property ss needed to change the cpu and memory from vRO workflow in vRA to Reconfigure a VM to change the CPU/Memory? I can't seem to find any documentation below is the code I have thus far :
System.log("+ Starting Item: Reconfigure CPU/Memory");
var vmResources = vCACCAFEEntitiesFinder.findCatalogResources(cafeHost,vcacVM.virtualMachineName);
for (var i = 0; i < vmResources.length; i++){
var vmResource = vmResources[i];
if (vmResource.resourceTypeRef.getLabel() == 'Virtual Machine') {
System.log("Found vmResource " + vmResource.name + " Reconfiguring CPU/Memory.");
var inputs = new Properties();
var d = "Reconfiguring VIrtual Machine";
inputs.description = d;
System.log("Creating Property Set for Inputs");
System.log("New CPU Value: " + updatedCPU);
inputs.put("VirtualMachine.CPU.Count", updatedCPU);
System.log("New Memory Size (MB): " + newMemoryGB);
inputs.put("VirtualMachine.Memory.Size", newMemoryGB);
inputs.reasons = "Request to update CPU/Memory.";
var operations = vmResource.operations;
for each (operation in operations) {
if (operation.name.match(/reconfigure/i)) {
System.log(d);
//System.log(operation.name);
System.getModule("com.vmware.library.vcaccafe.request").requestResourceAction(operation, inputs);
}
}
}