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

Re: create a vapp with a single vm

$
0
0

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);

 

 

Hope this gets you going.


Viewing all articles
Browse latest Browse all 249166

Trending Articles



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