This issue was originally opened by @bruteForceAttack as hashicorp/packer#10363. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
Problem is with acquiring IP address from vmware vsphere (gathered from vm-tools) so Packer doesn't do the shutdown command via vmware tools. Information such as IP, hostname and so on however is present in vSphere also VM is reachable with SSH client from localhost.
So far this happens only with Cisco image of CSR 1000v: csr1000v-universalk9.16.09.01.iso other OS type like Linux or Windows is good.
Problem seems to be related to the change (GH-9450) as per release notes for version number 1.6.1.
Everything is fine and works with previous versions e.g. 1.5.6 or 1.6.0. I have tested 1.6.1+ and no success at all.
uname -a
Darwin 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin
Log Fragments and crash.log files
No crash logs are generated. The build timeouts because of no SSH connection into VM.
Packers standard output:
vsphere-iso: output will be in this color.
==> vsphere-iso: Creating VM...
==> vsphere-iso: Customizing hardware...
==> vsphere-iso: Mounting ISO images...
==> vsphere-iso: Adding configuration parameters...
==> vsphere-iso: Set boot order temporary...
==> vsphere-iso: Power on VM...
==> vsphere-iso: Waiting 5s for boot...
==> vsphere-iso: Typing boot command...
==> vsphere-iso: Waiting for IP...
==> vsphere-iso: Timeout waiting for IP.
==> vsphere-iso: Clear boot order...
==> vsphere-iso: Power off VM...
==> vsphere-iso: Destroying VM...
Build 'vsphere-iso' errored after 36 minutes 13 seconds: Timeout waiting for IP.
==> Wait completed after 36 minutes 13 seconds
==> Some builds didn't complete successfully and had errors:
--> vsphere-iso: Timeout waiting for IP.
==> Builds finished but no artifacts were created.
This issue was originally opened by @bruteForceAttack as hashicorp/packer#10363. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
Problem is with acquiring IP address from vmware vsphere (gathered from vm-tools) so Packer doesn't do the shutdown command via vmware tools. Information such as IP, hostname and so on however is present in vSphere also VM is reachable with SSH client from localhost. So far this happens only with Cisco image of CSR 1000v: csr1000v-universalk9.16.09.01.iso other OS type like Linux or Windows is good. Problem seems to be related to the change (GH-9450) as per release notes for version number 1.6.1. Everything is fine and works with previous versions e.g. 1.5.6 or 1.6.0. I have tested 1.6.1+ and no success at all.
Reproduction Steps
packer build -force -var-file=variables.json template-cisco-csr.json
Packer version
1.6.5 (1.6.1+)
Simplified Packer Buildfile
Packer json template file:
Operating system and Environment details
Log Fragments and crash.log files
No crash logs are generated. The build timeouts because of no SSH connection into VM.
Packers standard output:
Log file generated by packer (PACKER_LOG=1):
log file
``` 2020/12/09 15:18:14 [INFO] Packer version: 1.6.5 [go1.15.3 darwin amd64] 2020/12/09 15:18:14 Checking 'PACKER_CONFIG' for a config file path 2020/12/09 15:18:14 'PACKER_CONFIG' not set; checking the default config file path 2020/12/09 15:18:14 Attempting to open config file: .packerconfig 2020/12/09 15:18:14 [WARN] Config file doesn't exist: .packerconfig 2020/12/09 15:18:14 Setting cache directory: templates/packer/packer_cache 2020/12/09 15:18:14 Creating plugin client for path: templates/packer/packer 2020/12/09 15:18:14 Starting plugin: templates/packer/packer []string{"templates/packer/packer", "plugin", "packer-builder-vsphere-iso"} 2020/12/09 15:18:14 Waiting for RPC address for: templates/packer/packer 2020/12/09 15:18:14 packer plugin: [INFO] Packer version: 1.6.5 [go1.15.3 darwin amd64] 2020/12/09 15:18:14 packer plugin: Checking 'PACKER_CONFIG' for a config file path 2020/12/09 15:18:14 packer plugin: 'PACKER_CONFIG' not set; checking the default config file path 2020/12/09 15:18:14 packer plugin: Attempting to open config file: .packerconfig 2020/12/09 15:18:14 packer plugin: [WARN] Config file doesn't exist: .packerconfig 2020/12/09 15:18:14 packer plugin: Setting cache directory: templates/packer/packer_cache 2020/12/09 15:18:14 packer plugin: args: []string{"packer-builder-vsphere-iso"} 2020/12/09 15:18:15 packer plugin: Plugin address: unix /var/folders/3l/jj8w1c854ml0hfzcjgczq1w00000gn/T/packer-plugin283264697 2020/12/09 15:18:15 packer plugin: Waiting for connection... 2020/12/09 15:18:15 Received unix RPC address for templates/packer/packer: addr is /var/folders/3l/jj8w1c854ml0hfzcjgczq1w00000gn/T/packer-plugin283264697 2020/12/09 15:18:15 packer plugin: Serving a plugin connection... 2020/12/09 15:18:15 Preparing build: vsphere-iso 2020/12/09 15:18:15 ui: [1;32mvsphere-iso: output will be in this color.[0m 2020/12/09 15:18:15 ui: 2020/12/09 15:18:15 Build debug mode: false 2020/12/09 15:18:15 Force build: true 2020/12/09 15:18:15 On error: 2020/12/09 15:18:15 Waiting on builds to complete... 2020/12/09 15:18:15 Starting build run: vsphere-iso 2020/12/09 15:18:15 Running builder: vsphere-iso 2020/12/09 15:18:15 [INFO] (telemetry) Starting builder vsphere-iso 2020/12/09 15:18:15 packer plugin: No URLs were provided to Step Download. Continuing... 2020/12/09 15:18:15 packer plugin: No CD files specified. CD disk will not be made. 2020/12/09 15:18:15 ui: [1;32m==> vsphere-iso: Creating VM...[0m 2020/12/09 15:18:17 ui: [1;32m==> vsphere-iso: Customizing hardware...[0m 2020/12/09 15:18:17 ui: [1;32m==> vsphere-iso: Mounting ISO images...[0m 2020/12/09 15:18:17 packer plugin: Check if ISO path is a Content Library path 2020/12/09 15:18:18 packer plugin: ISO path not identified as a Content Library path 2020/12/09 15:18:18 packer plugin: Using [Install] Cisco/CSR1000v/csr1000v-universalk9.16.09.01.iso as the datastore path 2020/12/09 15:18:18 packer plugin: Creating CD-ROM on controller '&{{{} 200 0xc000cab720