Deploy VM from template fails to obtain IP when VM is off

XMLWordPrintable

      In the vSphere-cloud plugin build step "Deploy VM from Template", it is possible to create a new VM from a template and not switch it on.
      This is useful because the "Power-On/Resume VM" step allows you to configure timeouts whereas they are hard-coded in the deploy build step, so if your VM takes a while to start then you have to power it on as a separate step.

      Obviously, if a VM is switched off, it's not going to have VMware tools running, and so you get something like the following:

      [vSphere] Performing vSphere build step: "Deploy VM from template"
      [vSphere] Attempting to use server configuration: "hursley_vsphere"
      [vSphere] Deploying new vm "myVmCloneName" from template "myVmTemplate"
      [vSphere] Started cloning of VM. Please wait ...
      [vSphere] "myVmCloneName" successfully deployed!
      [vSphere] Error: Timed out after waiting 60 seconds to get IP for "myVmCloneName"
      [vSphere]
      [vSphere] Performing vSphere build step: "Power-On/Resume VM"
      [vSphere] Attempting to use server configuration: "hursley_vsphere"
      [vSphere] Successfully retrieved IP for "myVmCloneName" : 1.2.3.4
      [vSphere] Exposing 1.2.3.4 as environment variable VSPHERE_IP

      It looks like the Deploy.java code is trying (and failing) to obtain the IP address (with a hard-coded timeout of 60 seconds) regardless of whether the new VM has been turned on or not.
      I would suggest that when doing a deploy step, if the VM is not being switched on as part of that step then that step should not attempt to fetch the IP address.

            Assignee:
            Unassigned
            Reporter:
            pjdarton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: