VMware {code} Community
tkcoder
Contributor
Contributor

how do I programtically create a guest vm

I just downloaded the VIX 1.7 SDK. But I don't see there is any function to create guest vm programtically. Anyone knows how to do it?

Reply
0 Kudos
4 Replies
navadavuluri
Contributor
Contributor

http://communities.vmware.com/thread/219943

Doesn't seem like VIX is for creating VMs

http://communities.vmware.com/community/developer/codecentral
Reply
0 Kudos
heyitspablo
VMware Employee
VMware Employee

I would look at the the vSphere Web Services SDK if you really want to roll up your sleeves,,, or if you need to do this in a jiffy consider using PowerCLI.. Sample code is included in all of our kits, and we also have code posted on our Code Central site "Sample Code"

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

Thanks for the info. I noticed that there is a vSphere SDK for .NET included in the PowerCLI package . Is it same as vSphere Webservice SDK ? Which one should I focus more ?

Reply
0 Kudos
cpanelgordon
Contributor
Contributor

I saw this thread and thought I'd comment on it. I think this is a great disadvantage in the vix api. I'm wanting to do the same thing. But it seems that there would be a better way of doing this other than automating the task via wasp (not everyone runs microsoft products). I believe you could create a 'blank' virtual guest in a compressed file. Then the automated tasks to creating the virtual guest would be as follows.

  1. Copy the template guest to the host machine

  2. change the mac address in the vmx file (you can randomly do this, vmware has a range that they are allowed.)

  3. Change any other machine specific settings (mounted cd image, network adapter, cpu, ram)

  4. register the machine via the vix api

I think I'll be trying out this to see if it's possible. Any other suggestions would be appreciated.

Reply
0 Kudos