To use this function add it to the class library file named vCenterServerService.ts
GitHub Repository: https://github.com/SimonSparksUK/Orchestrator
Filename: vCenterServerService.ts
publicVcVirtualMachineReserveMemory(objVcVirtualMachine:VcVirtualMachine,intVcSharesInfoMemory:number,intVcResourceAllocationInfoMemoryReservation:number):boolean{
letobjVcSharesInfoMemory:VcSharesInfo=newVcSharesInfo();
objVcSharesInfoMemory.shares=intVcSharesInfoMemory;
objVcSharesInfoMemory.level=VcSharesLevel.high;
letobjVcResourceAllocationInfoMemory:VcResourceAllocationInfo=newVcResourceAllocationInfo();
objVcResourceAllocationInfoMemory.reservation=intVcResourceAllocationInfoMemoryReservation;
objVcResourceAllocationInfoMemory.shares=objVcSharesInfoMemory;
letobjVcVirtualMachineConfigSpec:VcVirtualMachineConfigSpec=newVcVirtualMachineConfigSpec();
objVcVirtualMachineConfigSpec.memoryAllocation=objVcResourceAllocationInfoMemory;
letblnReturn:boolean=this.VcVirtualMachineReconfigure(objVcVirtualMachine,objVcVirtualMachineConfigSpec);
returnblnReturn;
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
