Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251313

Re: how to create vm from existing vapp template

$
0
0

Think I might have answered this in another thread for you - but in case others are looking...

 

Hope this helps, using the .NET SDK:

 

//Load VDC you would like to place vapp in

Vdc vdc = Vdc.GetVdcByReference(Client,vdcReferenceUrl);

//Load template you would like to use

VappTemplate template = VappTemplate.GetVappTemplateByReference(Client,templateReferenceUrl);                                                                          

 

InstantiationParamsType instantiationParamsType = new InstantiationParamsType();

InstantiateVAppTemplateParamsType stuff = new InstantiateVAppTemplateParamsType

                                                              {
                                                                  AllEULAsAccepted = true,
                                                                  name = "the name for the vapp",
                                                                  Source = template.Reference,
                                                                  deploy = true,
                                                                  Description = "Some description",
                                                                  InstantiationParams = instantiationParamsType,
                                                              };
//Method to create it created... the app returned will not be usable for a while, but you can get the tasks for it and reload to see the status

Vapp app = vdc.InstantiateVappTemplate(stuff);


Viewing all articles
Browse latest Browse all 251313


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>