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: API timeout waiting for IP but one IP was found #491

Open
1 of 2 tasks
rgl opened this issue Nov 22, 2024 · 0 comments
Open
1 of 2 tasks

vsphere-clone: API timeout waiting for IP but one IP was found #491

rgl opened this issue Nov 22, 2024 · 0 comments
Labels
bug builder/vsphere-clone Builder: vsphere-clone
Milestone

Comments

@rgl
Copy link
Contributor

rgl commented Nov 22, 2024

Overview of the Issue

While trying to use vsphere-clone, it always waits for the ip_wait_timeout = "3m" amount, then shows this warning:

[WARN] API timeout waiting for IP but one IP was found. Using IP: 10.11.0.25

Although the vSphere UI shows the IP address before that. So it seems something is failing, because the packer plugin should have detected the IP before the ip_wait_timeout elapsed, but the packer log does not show any more than:

2024/11/22 13:59:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 13:59:11 [INFO] Waiting for IP, up to total timeout: 3m0s, settle timeout: 5s
2024/11/22 13:59:11 ui: �[1;32m==> vsphere-clone.windows: Waiting for IP...�[0m
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [WARN] API timeout waiting for IP but one IP was found. Using IP: 10.11.0.25
2024/11/22 14:02:11 ui: �[1;32m==> vsphere-clone.windows: Using SSH communicator to connect: 10.11.0.25�[0m
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [INFO] Waiting for SSH, up to timeout: 1h0m0s
2024/11/22 14:02:11 ui: �[1;32m==> vsphere-clone.windows: Waiting for SSH to become available...�[0m
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [INFO] Attempting SSH connection to 10.11.0.25:22...
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [DEBUG] reconnecting to TCP connection for SSH
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [DEBUG] handshaking with SSH
2024/11/22 14:02:11 packer-plugin-vsphere_v1.4.2_x5.0_linux_amd64 plugin: 2024/11/22 14:02:11 [DEBUG] handshake complete!

Reproduction Steps

Please provide the steps to reproduce the issue.

Packer Version

Packer v1.11.2

Plugin Version and Builders

1.4.2

  • vsphere-iso
  • vsphere-clone

VMware vSphere Version

8.0.1

Guest Operating System

Windows 11.

Simplified Packer Buildfile

packer {
  required_plugins {
    vsphere = {
      version = "1.4.2"
      source  = "github.com/hashicorp/vsphere"
    }
  }
}

source "vsphere-clone" "windows" {
  insecure_connection      = true
  vcenter_server           = var.vsphere_host
  username                 = var.vsphere_username
  password                 = var.vsphere_password
  cluster                  = var.vsphere_cluster
  resource_pool            = var.vsphere_esxi_host
  datastore                = var.vsphere_datastore
  template                 = var.vsphere_template
  folder                   = var.vsphere_folder
  vm_name                  = var.vsphere_vm_name
  ip_wait_timeout          = "3m"
  communicator             = "ssh"
  ssh_username             = var.provision_username
  ssh_password             = var.provision_password
  ssh_timeout              = "1h"
  ssh_file_transfer_method = "sftp"
  configuration_parameters = {
    "guestinfo.init" = jsonencode({
      builtinAdministratorUsername = var.provision_username
      builtinAdministratorPassword = var.provision_password
    })
  }
}

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

  provisioner "powershell" {
    inline = [
      "Write-Host 'Hello, World!'",
    ]
  }
}

Operating System and Environment Details

Windows 11 24H2 Enterprise.

Log Fragments and crash.log Files

N/A

@rgl rgl added the bug label Nov 22, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Nov 22, 2024
@tenthirtyam tenthirtyam added the builder/vsphere-clone Builder: vsphere-clone label Nov 22, 2024
@tenthirtyam tenthirtyam changed the title [WARN] API timeout waiting for IP but one IP was found. `vsphere-clone: API timeout waiting for IP but one IP was found. Nov 22, 2024
@tenthirtyam tenthirtyam changed the title `vsphere-clone: API timeout waiting for IP but one IP was found. `vsphere-clone: API timeout waiting for IP but one IP was found Nov 22, 2024
@tenthirtyam tenthirtyam changed the title `vsphere-clone: API timeout waiting for IP but one IP was found vsphere-clone: API timeout waiting for IP but one IP was found Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug builder/vsphere-clone Builder: vsphere-clone
Projects
None yet
Development

No branches or pull requests

2 participants