VMware Cloud Community
Mneumonik
Contributor
Contributor

Scripting a new VM via C#/ASP.Net

Hey Folks,

Just wanting to know if its possible to create a VM based on a template via C# code? Like as in if a customer pays me, verify the payment, if it is verified, then kick off a deployment, so most of the work is done for me except for IP'ing the VM and setting credentials etc.

0 Kudos
1 Reply
AnatolyVilchins

There is no public C# API for VMM. The only public interface is a

Powershell. However you can start Powershell commands from C#. Check

out this sample:

You

will use New-VM cmdlet to create virtual machine based on a template.

You can get example by typing "get-help new-vm -detailed" in Powershell

console. (see example#2)

Regards,

Starwind Software Developer

www.starwindsoftware.com

Kind Regards, Anatoly Vilchinsky
0 Kudos