vCO Workflow Action to Add CPUs to a vCloud Virtual Machine

The following is the script to add CPUs to a vCloud virtual machine

 

 

objVclVM.updateInternalState();

var objVclCimUnsignedInt;
	objVclCimUnsignedInt = new VclCimUnsignedInt();
	objVclCimUnsignedInt.value = intProcessorShares;

var objVclVirtualCpu;
	objVclVirtualCpu = objVclVM.getCpu();
	objVclVirtualCpu.noOfCpus = intProcessorNumber;
	objVclVirtualCpu.itemResource.weight = objVclCimUnsignedInt; 

var objVclTask;
	objVclTask = objVclVM.updateCpu(objVclVirtualCpu);	

objCustomActions.waitVclTask(objVclTask);

Leave a Reply