i am using the packer builder vsphere-iso to build the vm from an iso. I am using the ks file to get the. ip and networking , hostname to the image.
i am able to spin the vm in vmware and can see the login page instead but the json file is stucking at vsphere-iso: Waiting for SSH to become available…
getting an error “2020/04/10 04:40:05 packer-builder-vsphere-iso plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 10.0.68.221:22: i/o timeout”
i have enabled the ssh service and port 22 in the kickstart file but still same error.
network is connected to the vm and vm is displaying the correct ip address and dns name. i can see the console as well which shows login page with the correct hostname (which was mentioned in the kickstart file).
logs says:
==> vsphere-iso: Waiting for IP…
2020/04/10 05:46:54 packer-builder-vsphere-iso plugin: [INFO] Waiting for IP, up to total timeout: 30m0s, settle timeout: 5s
2020/04/10 05:52:46 packer-builder-vsphere-iso plugin: VM IP aquired: 10.0.68.221
2020/04/10 05:52:47 packer-builder-vsphere-iso plugin: VM IP is still the same: 10.0.68.221
2020/04/10 05:52:49 packer-builder-vsphere-iso plugin: VM IP is still the same: 10.0.68.221
2020/04/10 05:52:51 packer-builder-vsphere-iso plugin: VM IP is still the same: 10.0.68.221
==> vsphere-iso: IP address: 10.0.68.221
2020/04/10 05:52:53 packer-builder-vsphere-iso plugin: VM IP is still the same: 10.0.68.221
2020/04/10 05:52:53 packer-builder-vsphere-iso plugin: VM IP seems stable enough: 10.0.68.221
==> vsphere-iso: Using ssh communicator to connect: 10.0.68.221
==> vsphere-iso: Waiting for SSH to become available…
2020/04/10 05:52:53 packer-builder-vsphere-iso plugin: [INFO] Waiting for SSH, up to timeout: 3m0s
2020/04/10 05:53:08 packer-builder-vsphere-iso plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 10.0.68.221:22: i/o timeout
2020/04/10 05:53:28 packer-builder-vsphere-iso plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 10.0.68.221:22: i/o timeout
for firewall i have the line in the ks file: firewall --disabled #–port=22:tcp
Packer will wait for 10m by default to ssh into your vm, then give up. Depending on how long it takes for your vm to configure based on your kickstart file, have you tried increasing the following Packer qmeu builder setting?