Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout waiting for IP with vsphere-clone using a Cisco 8000v router #11417

Closed
aj-cruz opened this issue Nov 26, 2021 · 3 comments
Closed

Timeout waiting for IP with vsphere-clone using a Cisco 8000v router #11417

aj-cruz opened this issue Nov 26, 2021 · 3 comments

Comments

@aj-cruz
Copy link

aj-cruz commented Nov 26, 2021

Overview of the Issue

I am trying to use Packer to clone a Cisco Catalyst 8000v router from vSphere and inject a custom configuration using CDROM.
That part works perfectly. The VM clones, boots, and applies the day 0 confg from the CDROM.
The configuration is pushed, the one configured interface comes up and is reachable, but Packer sits at "Waiting for IP..." before eventually timing out.
The VM has eight network adapters, but I'm only configuring one.

When the VM boots, an IP address is reported by vCenter, and I can ping it.
I don't actually need to provision it via SSH, I can do it all via CDROM for my use case, so disabling the IP wait would be fine as well.

Reproduction Steps

Import Cisco Catalyst 8000v from OVA
Convert to template
packer build .

Packer version

1.7.8

Simplified Packer Template

source "vsphere-clone" "Cat8Kv" {
  template            = "8Kv-17.06.01a"
  host                = "phys-esxi.mylab.local"
  vm_name             = "PACKER-8Kv"
  vcenter_server      = "vcenter.ajlab.local"
  username            = "uname"
  password            = "pass"
  ssh_password        = "admin"
  ssh_username        = "admin"
  insecure_connection = true
  datacenter          = "MYLAB"
  folder              = "DMVPN Lab"
  network             = "MYLAB VDS/MYLAB Management"
  ip_wait_timeout     = "8m"
  cd_content = {
    "iosxe_config.txt" = templatefile("8kv_dmvpn_spoke.tpl", { hostname = "PACKER-8KV" })
  }
  cd_label = "iosxe_config"
}

build {
  sources = ["source.vsphere-clone.Cat8Kv"]
}

Operating system and Environment details

WSL (Ubuntu) on Win10

Log Fragments and crash.log files

2021/11/26 17:13:56 ui: �[1;32m==> vsphere-clone.Cat8Kv: Power on VM...�[0m
2021/11/26 17:13:59 packer-builder-vsphere-clone plugin: [INFO] Waiting for IP, up to total timeout: 8m0s, settle timeout: 5s
2021/11/26 17:13:59 ui: �[1;32m==> vsphere-clone.Cat8Kv: Waiting for IP...�[0m
2021/11/26 17:21:59 ui error: �[1;31m==> vsphere-clone.Cat8Kv: Timeout waiting for IP.�[0m
2021/11/26 17:21:59 ui: �[1;32m==> vsphere-clone.Cat8Kv: Power off VM...�[0m
2021/11/26 17:22:02 ui: �[1;32m==> vsphere-clone.Cat8Kv: Destroying VM...�[0m
2021/11/26 17:22:03 ui: �[1;32m==> vsphere-clone.Cat8Kv: Deleting cd_files image from remote datastore ...�[0m
2021/11/26 17:22:04 packer-builder-vsphere-clone plugin: Deleting CD disk: /tmp/packer2965325891.iso
2021/11/26 17:22:04 [INFO] (telemetry) ending vsphere-clone.Cat8Kv
2021/11/26 17:22:04 ui error: �[1;31mBuild 'vsphere-clone.Cat8Kv' errored after 9 minutes 9 seconds: Timeout waiting for IP.�[0m
@aj-cruz aj-cruz added the bug label Nov 26, 2021
@aj-cruz
Copy link
Author

aj-cruz commented Nov 26, 2021

I see I can do communicator = "none"
But then the VM shuts down before the day0 config is pushed via cdrom and it seems like no communicator causes everything else to be ignored. boot_wait is ignored, boot_command with wait is ignored, I even tried a shell-local provisioner with a shell sleep command but the build always finishes immediately after cloning the VM.

@github-actions
Copy link

This issue has been migrated to hashicorp/packer-plugin-vsphere#136 due to the Packer Plugin split.

Please follow the new issue for updates.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants