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
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
Overview of the Issue
While trying to use
vsphere-clone, it always waits for theip_wait_timeout = "3m"amount, then shows this warning: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_timeoutelapsed, but the packer log does not show any more than:Reproduction Steps
Please provide the steps to reproduce the issue.
Packer Version
Packer v1.11.2
Plugin Version and Builders
1.4.2
vsphere-isovsphere-cloneVMware vSphere Version
8.0.1
Guest Operating System
Windows 11.
Simplified Packer Buildfile
Operating System and Environment Details
Windows 11 24H2 Enterprise.
Log Fragments and
crash.logFilesN/A