0 Replies Latest reply on Oct 12, 2018 3:26 AM by ahmedrabie990

    VCO   change  vm   when  using instantiateVAppTemplateVdc

    ahmedrabie990 Lurker

      I need to  know   how  to change  vm  name when using instantiateVAppTemplateVdc .

      i have already know  how to create   vapp  with vm but  and can't change vm  name

       

      that's my example

       

      info = new VclMsg();

      info.value = "Lease Settings";

      deploymentLeaseInSeconds = 168 * 60 * 60; // Hours

      storageLeaseInSeconds = 720 * 60 * 60; // Hours

      localityParamsReferences = new Array ();

      actionResult = System.getModule("com.vmware.library.vCloud.schema.objects").createLeaseSettingsSection(null,deploymentLeaseInSeconds,info,0,null,storageLeaseInSeconds) ;

       

       

      /// convert to array

      actionResult = System.getModule("com.vmware.library.vCloud.common").convertToArray(actionResult) ;

       

       

      /////  create  instation parmas

      insatns_parms = System.getModule("com.vmware.library.vCloud.schema.objects").createInstantiationParams(actionResult) ;

       

      //// create insata vapp tmplate parms

      var paramsArg = System.getModule("com.vmware.library.vCloud.schema.objects").createInstantiateVAppTemplateParams(

      0,1,'sdsd',insatns_parms,0,0,"sdsdsdsdsd",

      1,vapptemp,[],vdc_obj)

       

       

      ///  craete insata  vpp template

      actionResult = System.getModule("com.vmware.library.vCloud.operation").instantiateVAppTemplateVdc(targetEntityArg,paramsArg) ;