VMware {code} Community
rohitdesh
Contributor
Contributor
Jump to solution

Can i configure installed virtual machine programatically?

Hey guys, is there any low level api which allows me to configure installed virtual machine using c#? (like increasing memory or adding n/w adapter)Vix api doesn't provide such functions.

Reply
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Take a look at the vSphere API and you should also take a look at this document if you're new to vSphere API/SDKs -

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

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".

View solution in original post

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

Take a look at the vSphere API and you should also take a look at this document if you're new to vSphere API/SDKs -

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

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
rohitdesh
Contributor
Contributor
Jump to solution

Lamw thank u very much. I didn't know much about vsphere api . It is used for configuring virrtual machines.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

np.

Anything you can do using the vSphere Client to create/configure your hosts/VMs, you'll want to use the vSphere API.

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

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".

rohitdesh
Contributor
Contributor
Jump to solution

Hey lamw, do u know whether wrapper classes exist over vsphere api in c#? Or can u give me sample codes for performing basic vmware tasks....

Reply
0 Kudos
rohitdesh
Contributor
Contributor
Jump to solution

Can i use vsphere api on vmware server? Because it's documentation tells me it can only be used on vcentre server and ESXi server.

Reply
0 Kudos
rohitdesh
Contributor
Contributor
Jump to solution

Can i use vsphere api on vmware server? Because it's documentation tells me it can only be used on vcentre server and ESXi server.

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

vSphere API is only meant to be used against vCenter and ESX(i), the other VMware products will not work with the API.

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

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".

rohitdesh
Contributor
Contributor
Jump to solution

Thanks again lamw . But does it mean that i won't be able to configure virtual machines installed using vmware server.....

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

That's correct, the vSphere API is for the vSphere product line, VMware Server or other hosted/desktop products is not part of that suite.

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

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
BrendanSalt
Contributor
Contributor
Jump to solution

Is there anyway to do this with Workstation?

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

As I mentioned, the whole "provisioning" of the OS is something outside of the VMware APIs. There's probably ways you can hack around it like automating the mount of the windows ISO, but again the actual "build" process will depend on what type of OS provisioning system you have whether that is click click click next or using unattended installation. Hopefully this all makes sense, the VMware APIs are there to help provision/configure the VM shell, it doesn't deal with the actual OS installation.

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

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