I am trying to execute the below script but I am getting error:-
var memory = VM.getMemory();
System.log(memory);
var sizeOfMemory = System.getModule("com.vmware.library.vCloud.operation").getMemorySizeVirtualMemory(memory);
System.log("Size of memory " + sizeOfMemory);
var newMemSize = sizeOfMemory + 4096;
System.log(newMemSize);
Error:-
TypeError: Cannot find function getMemorySize in object DynamicWrapper (Instance) : [VclVirtualMemory]-[class com.vmware.vmo.plugin.vcloud.model.VirtualMemory] -- VALUE : com.vmware.vmo.plugin.vcloud.model.VirtualMemory@2fd5fc11. (Dynamic Script Module name : getMemorySizeVirtualMemory#1)