3 Replies Latest reply on Jun 21, 2019 1:46 AM by Siberiatiger

    Binding  ip-address into  a newly-generated  virtualNic

    Siberiatiger Lurker

      I'm writing perl application about  creating virtualNic  in  vCenter.  Until now, the virtualNic is generated successfully  and  the mac-address can  be  retrieved,  but  I  have to wait fourty-second  for  the  ip-address  returned.  I  want to know is there any efficient way to  get  ip-address  immediately  after  generating the  virtualNic? Or,  if  there is another way to  allow me  bind  a  newly-generated  ip-address  into the  virtualNic?  thank  you  for  help.  

        • 1. Re: Binding  ip-address into  a newly-generated  virtualNic
          daphnissov Guru
          Community WarriorsvExpert

          The IP address is only returned to vCenter after it has been set (or retrieved via DHCP) and then passed from VMware tools. If you need it faster you could *possibly* try to restart the VMware tools service inside the guest, but that's no guarantee. There are several factors that determine this time.

          • 2. Re: Binding  ip-address into  a newly-generated  virtualNic
            Siberiatiger Lurker

            hello daphnissov,  

            Deeply  appreciate your  attention  and  messages. It seems  impossible for  me  to  restart  vmware tools  in  my  application.  I  am  trying  the other  way  to  assign  the  ipaddress into  the  newly  created  virtualNic.  Currently,  I  find  the  solution of using  CustomizationVM_Task  to implement  this requirement.  According to documentation, CustomizationSpec  is  needed  for  this  task,  and  three  arguments  nicSettingMap, identity  and globalIPSettings are needed.  right now,  the  parameter globalIPSettings  is  undetermined. To build a globalIPSettings  variable,  it is supposed  to  use  two xsd:string[]  parameters: dnsServerList &  dnsSuffixList. I tested by  using  arrayofstring in several different  formats, but  always  get  syntax errors.

            • 3. Re: Binding  ip-address into  a newly-generated  virtualNic
              Siberiatiger Lurker

              I have overcomed this obstacle and made a progress  in  my  implementation. Currently, I  come across a fault called  NicSettingMismatch.  the error message  shows  'the number of network adapter settings in the customization specification: 1 does not match the number of  network adpters present in the virtual machine".   Regarding  the error  message,  do  I  need to  create a  new  CustomizationSpec involving  other two adapters.  Do we  have  other less  complicated  solution  to  solve this  fault?  Thank  you .