Hi guys,
Before I venture into the unknown with the Vpshere SDK for .Net. Can somebody tell me if I can do the following with the SDK for C#?
Create or clone a VM - I believe this can be done from looking at the samples.
Configure the following on a VM
- Hostname
- IP address
- CPU's assigned to it
- memory asssigned to it
- disk space
Also am I able to reference all of the methods I could refernce from the power CLI?
cheers.
Thanks in advance for looking at my question.
Yep this is possible with vSphere SDK using C#
You'll want to use either CloneVM_Task() or CreateVM_Task() and pass in a configuration spec depending if you're creating a new VM from scratch or from an existing VM. All configurations that you can do using the vSphere Client you can do with the API
You may want to take a look at some of the sample code available on Code Central for C#: http://communities.vmware.com/community/developer/codecentral/vsphere_ws_c and that should help you get started.
Regarding the API reference, you'll want to take a look here: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html
If you're new to the API/SDK's, I highly recommend you take some time and go over this document which gives a very good overview and how to get started:
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
Hi LawM,
thank you very much for your both fast and informative reply.
I will take the time to read through the information you have provided.
Many thanks once again.