VMware Cloud Community
rajeevsjsu
Contributor
Contributor

How To Set / Increase Ram Size in C# ?

Hello,

i wanna know how to set / increase / decrese RAM,  Processor, Disk sizes in C#. Please give me an example of how to do this..

Thanks

0 Kudos
2 Replies
11satya
Enthusiast
Enthusiast

Hi i think it is not right place for this .but after googling find this link may help you

http://www.eggheadcafe.com/community/csharp/2/10071419/application-memory-size-and-out-of-memory-exc...

http://imagicon.info/cat/5-59/vbsmile.png_________________________________
Good luck!

0 Kudos
LucD
Leadership
Leadership

For the CPU and the memory changes you will have to use the ReconfigVM_Task method, more specifically the memoryMB and numCPUs properties in the VirtualMachineConfigSpec object that you pass as a parameter to the method.

For extending virtual disks you will have the use the deviceChange property in the same object.

You will find information on how to interact with the vSphere Web Services API in the following documents

http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.pg.doc_50/PG_Ch1_Introd_Virtual_Datacenter....

If you download the vSphere Web Services SDK, it comes with a number of samples (including C#).

You also want to have a look at Project Onyx, it generates code based on your actions in the vSphere Client.

See my Taking the new Onyx 2.0 for a spin for more info on this tool.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos