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

vsphere-clone: timeout waiting for IP using a Cisco 8000v router #136

Closed
hc-github-team-packer opened this issue Nov 29, 2021 · 5 comments
Closed
Labels
bug builder/vsphere-clone Builder: vsphere-clone

Comments

@hc-github-team-packer
Copy link

This issue was originally opened by @aj-cruz in hashicorp/packer#11417 and has been migrated to this repository. The original issue description is below.


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
@tenthirtyam
Copy link
Collaborator

@aj-cruz,

Out of curiosity, if the template were stripped down to a single network interface, does the process complete sucessfully?

There is a similar issue ( GH-133 ) for the vsphere-iso counterpart in the plugin that’s worked around by adding the additional NICs after the build.

Ryan

@aj-cruz
Copy link

aj-cruz commented Nov 29, 2021

@tenthirtyam
Negative, I pulled all but one of the interfaces out of the template and re-ran the clone and it still hangs at waiting for ip.
DHCP gives the interface an IP and I can ping it from the WSL host where packer is running.
Thanks.

@tenthirtyam
Copy link
Collaborator

@aj-cruz - Is open-vm-tools installed and running in the image?

Ryan

@aj-cruz
Copy link

aj-cruz commented Nov 29, 2021

@tenthirtyam
The summary page for the running VM shows VMware Tools: Running, version:2147483647 (Guest Managed)

@tenthirtyam tenthirtyam added the builder/vsphere-clone Builder: vsphere-clone label Nov 4, 2022
@tenthirtyam tenthirtyam changed the title Timeout waiting for IP with vsphere-clone using a Cisco 8000v router vsphere-clone: timeout waiting for IP using a Cisco 8000v router Nov 4, 2022
@tenthirtyam
Copy link
Collaborator

Is this still an issue?

@tenthirtyam tenthirtyam closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@hashicorp hashicorp locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug builder/vsphere-clone Builder: vsphere-clone
Projects
None yet
Development

No branches or pull requests

3 participants