VMware

This Question is Answered

2 "helpful" answers available (6 pts)
1 Replies Last post: Oct 26, 2009 7:19 AM by Cédric  

wmi plugin posted: Oct 22, 2009 12:47 PM

Click to view rgardnerS1's profile Novice 21 posts since
May 28, 2008
I've installed the wmi plugin, but it looks like it's mainly good for pulling information about the VM's and thats it.

I need to change the hostname of a vm, and then do a few other tasks on it. I thought the wmi interface would let me do this much like the VC plugin allows me to control the vm's. It looks like all the attributes are read only from the wmi plugin in the api explorer. I've currently got a c# program that uses wmi to rename the hosts after I clone them and do a few other things, but it would be nice to be able to implement this all from vsphere. Am I going down the wrong path here?

If this is possible, anybody have any example code on how this could be done?

Thanks,

Re: wmi plugin

1. Oct 26, 2009 7:19 AM in response to: rgardnerS1
Click to view Cédric's profile Hot Shot 75 posts since
Jun 27, 2008
You have to use methods... or the WMICommand from a WMIComputer. With this object, you can do all the WMI call you should need. See MSDN documetation to know wich methods you have to call. WMI Reference on MSDN

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities