VMware {code} Community
weebledude
Contributor
Contributor

Need sample code for a couple basic tasks

Hello,

I have a need to clone a VM from template, then query the new VM by name to get its MAC address which I will use to create an object in my provisioning tool then I need to play the VM. Can anyone point me to some c# sample code to query for the MAC and start the VM?

Thanks,

Bill

0 Kudos
2 Replies
heyitspablo
VMware Employee
VMware Employee

Bill,

Will see what we can do, we are pretty light on C# code samples..if anyone has any other suggestions for sample code please let us know..

-p

http://www.vmware.com/communities/content/developer/samplecode/

Keep up with latest info on vSphere PowerCLI http://blogs.vmware.com/vipowershell - Follow me on Twitter @heyitspablo
0 Kudos
admin
Immortal
Immortal

Please find the sample to query the mac address of a vm. To run this sample, you will need vimService2005.dll

And shall pass following arguments

-- args[0] Url of VC/Host

-- args[1] Userid

-- args[2] Password

-- args[3] IPAddress of the Host

-- args[4] Name of the vm

0 Kudos