0 Replies Latest reply on Sep 6, 2016 3:07 PM by samurai1993

    Failure to create a build profile from an existing VM

    samurai1993 Lurker

      I am attempting to use studiocli to create a build profile from a Centos 7 minimal OS install VM I created using vSphere Web Client on our ESX server running 5.5 using the instructions from Chapter 14: Build From and Existing VM of the 2.6 Developer's Guide.  I had no issues creating the VM, installed the provagent, and shut down the VM. However, when I to import the vm using

       

      studiocli --importvm --name TestMinCentos7 -v

       

      It is failing discovery

       

      root@emtbuild:/opt/vmware/etc/new_os# studiocli --importvm --name TestMinCentos7 -v

      This tool guides you to create an importing profile.

      Type *TAB* twice to get hint for answer.

      ===================================================

      Tell me about the INPUT VM.

      Source VM Location [type "vi" for remote VM]: vi                                                                                                              

      Please follow the instruction to find the source VM on remote host.

      REMOTE ENGINE TYPE: esx                                                                                                                                       

      REMOTE ENGINE VERSION : 5                                                                                                                                     

      HOST: emtesx                                                                                                                                                  

      PORT [443]:                                                                                                                                                   

      USERNAME [root]:                                                                                                                                              

      PASSWORD:

      PASSWORD AGAIN:

      [INFO ]: Contacting <emtesx:443> to get information about datacenter/datastore/...

      Resource pool [optional, ]:                                                                                                                                   

      [INFO ]: Read the VM list at <ha-datacenter/host/emtesx.tavve.com> ...

      Choose existing VM: SteveL-CentOS7.2Min                                                                                                                       

      [INFO ]: Read the snapshot list of VM <SteveL-CentOS7.2Min> ...

      Choose snapshot [optional]:                                                                                                                                   

      Linux OS vendor [optional]: Centos                                                                                                                            

      Linux OS major version [optional]: 7                                                                                                                          

      Linux OS minor version [optional]: 2                                                                                                                          

      ===================================================

      Tell me about provisioning settings for VM discovery!

      The provisioning host is defaulted to be <emtesx:443>.

      Resource pool [optional, ]:                                                                                                                                   

      [INFO ]: Read the VM list at <ha-datacenter/host/emtesx.tavve.com> ...

      Datastore [NFS2]: Datastore2                                                                                                                                  

      Network [VM Network]:                                                                                                                                         

      Choose a name for transient VM? The following VM names are in using: SteveL-CentOS7.2Min,

      Name for Transient VM [optional, SteveL-CentOS7.2Min]:TestMin7.2                                                                                              

      [INFO ]: Creating importing profile ...

      Path to save importing profile: /root/importp                                                                                                                 

      The profile "/root/importp.xml" is created

      Starting VM importing process; This process may take a while.

      Note that the provisioning agent /etc/vmware-studio/provagentd must exist in the input VM for the import process to proceed.

      If the agent is not already in place, terminate this process, copy /opt/vmware/www/provagent/vmware-studio-provagent*(deb|rpm) from VMware Studio to the input VM, install it, shut down the VM, and restart this process.

      VMware Studio Version - 2.6.0.0 Build 631426

      Description - VMware Studio 2.6.0.0

       

      Preparing input VM for discovery.

      Connecting to <ESX> at <emtesx> as <root>.

      Scanning for conflicting VM on provisioning host.

      Initiating VM discovery process.

      Preparing ISO with discovery scripts to be executed in the input VM.

      Use of uninitialized value in concatenation (.) or string at /opt/vmware/lib/build/VADK/VMDiscovery.pm line 238.

      Failure: Aborted by user or system intervention (signal Can't locate auto/VADK/ProvInterface/VimESX/attachCdFlo.al in @INC (@INC contains:  /opt/vmware/lib/build /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /opt/vmware/lib/build) at /opt/vmware/share/build/import.pl line 288

      was caught).

      Use of uninitialized value in substitution (s///) at /usr/share/perl/5.8/File/Basename.pm line 338.

      fileparse(): need a valid pathname at /opt/vmware/lib/build/VADK/ProvInterface/Vim.pm line 400

       

      The perl script /opt/vmware/lib/build/VADK/VMDiscovery.pm is complaining on the following line:

       

         my $isoPath = $discoverDir.'/'.$VADK::Build::provConfig{VADK::Constants::K_VMNAME}.'_'.VADK::Constants::PROVISO;

       

      $VADK::Build::provConfig{VADK::Constants::K_VMNAME} is not initialized and there the script fails. $VADK::Build::provConfig is used several times in the script so something must be wrong with my installation.