VMware {code} Community
sw3103
Contributor
Contributor
Jump to solution

Bypass vCenter

This may be a stupid question, but are there any SDKs/APIs that allow you to code against vSphere without going through vCenter?

The various SDKs that I've had a look at all require you to logon to vCenter. So does that mean I can only develop applications for vSphere if I buy a vCenter license?

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi,

vSphere is basically an umbrella under which vSphere SDK falls. Using vSphere web services SDK , you can manage your infrastructure by invoking methods/operations directly on the ESX server or vCenter server. It is not necessary to connect to vCenter server for invoking methods, however as pointed out by William in his post, there are certain operations which are only supported if connected to vCenter. Please refer to http://www.vmware.com/support/developer/vc-sdk/ for vSphere SDK documentation and SDK downloads.

Also, as referred by William, please go through starting with vSphere SDK documentation to have better understanding on you can leverage SDK.

Hope this would be helpful.

View solution in original post

Reply
0 Kudos
8 Replies
lamw
Community Manager
Community Manager
Jump to solution

Depends on the operations you're trying to perform, things like VMware cloning is only available with vCenter, so you need vCenter.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
sw3103
Contributor
Contributor
Jump to solution

I'm looking at fairly basic operations at the moment, like enumerate and reboot guests, create/reconfigure guests, etc.

Can you give me some more information on how I could do this without vCenter? Is there an SDK or something you can point me at?

Thanks

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Those look like standard power ops, which can be done directly on individual ESX(i) host.

Here is the vSphere API reference guide (learn to love this) - http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/index.html

You'll want to focus on the VirtualMachine object and all it's methods are here: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.VirtualMachine.html

If you're new to VMware's API/SDK's you'll want to spend some time going over this doc: , it'll help you get started and choose the language of choice and how to get started based on the binding you select

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi,

vSphere is basically an umbrella under which vSphere SDK falls. Using vSphere web services SDK , you can manage your infrastructure by invoking methods/operations directly on the ESX server or vCenter server. It is not necessary to connect to vCenter server for invoking methods, however as pointed out by William in his post, there are certain operations which are only supported if connected to vCenter. Please refer to http://www.vmware.com/support/developer/vc-sdk/ for vSphere SDK documentation and SDK downloads.

Also, as referred by William, please go through starting with vSphere SDK documentation to have better understanding on you can leverage SDK.

Hope this would be helpful.

Reply
0 Kudos
sw3103
Contributor
Contributor
Jump to solution

Thank you both for replying.

I think I may be confusing myself. I have already seen the API Reference Guide that you have mentioned, and it looks like the same code being used in the Create VM sample here:

http://communities.vmware.com/docs/DOC-10019

But this sample, along with the other ones I have seen, all require a vCenter URL. Are you saying that I can use the code in the Create VM sample without vCenter? Would I just connect to one of the hosts with a URL similar to "https://{ip address of esx host}/sdk"?

Thank you for your patience.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

No, the script explicitly calls out for vCenter Server URL, you need vCenter to perform a clone operation or any other operations that is only available on vCenter server.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
sw3103
Contributor
Contributor
Jump to solution

Is there any chance you could point me in the direction of some .NET code that does anything (reboot, create, etc) on a virtual guest without using vCenter?

Thanks.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

There should be some sample scripts as part of the SDK download and within the documentation, have you gone through all the documentation?

You can also browse the Developer Forum - Sample Code - http://communities.vmware.com/community/developer/codecentral to see if there's any samples.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos