I’m using vsphere-iso as a builder trying to bake an image. I use the ansible provisioner. After I reboot the VM with Ansible using reboot
module
- reboot: {}
it gets up but the vsphere builder return the error
2024/07/27 09:29:00 packer-plugin-ansible_v1.1.1_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 authentication attempt from 127.0.0.1:57504 to 127.0.0.1:35033 as salvatorem using none
2024/07/27 09:29:00 packer-plugin-ansible_v1.1.1_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 authentication attempt from 127.0.0.1:57504 to 127.0.0.1:35033 as salvatorem using publickey
2024/07/27 09:29:00 packer-plugin-ansible_v1.1.1_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 new exec request: /bin/sh -c 'rm -f -r /tmp/.ansible//ansible-tmp-1722065337.7463934-356417-18437696790995/ > /dev/null 2>&1 && sleep 0'
2024/07/27 09:29:00 packer-plugin-vmware_v1.0.11_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 [DEBUG] Opening new ssh session
2024/07/27 09:29:00 packer-plugin-vmware_v1.0.11_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 [ERROR] ssh session open error: 'EOF', attempting reconnect
2024/07/27 09:29:00 packer-plugin-vmware_v1.0.11_x5.0_linux_amd64 plugin: 2024/07/27 09:29:00 [DEBUG] reconnecting to TCP connection for SSH
2024/07/27 09:29:15 packer-plugin-vmware_v1.0.11_x5.0_linux_amd64 plugin: 2024/07/27 09:29:15 [ERROR] reconnection error: dial tcp 192.168.57.129:22: i/o timeout
2024/07/27 09:29:15 [INFO] 0 bytes written for 'stdout'
2024/07/27 09:29:15 [INFO] 0 bytes written for 'stderr'
2024/07/27 09:29:15 [INFO] 0 bytes written for 'stdin'
2024/07/27 09:29:15 packer-plugin-ansible_v1.1.1_x5.0_linux_amd64 plugin: 2024/07/27 09:29:15 [INFO] 0 bytes written for 'stdout'
2024/07/27 09:29:15 packer-plugin-ansible_v1.1.1_x5.0_linux_amd64 plugin: 2024/07/27 09:29:15 [INFO] 0 bytes written for 'stderr'
==> vmware-iso.haproxy: dial tcp 192.168.57.129:22: i/o timeout
If I try to ssh manually to the instance I can without major issues. The builder has set the ssh_timeout: 60m
.
I’m usaing Packer 1.11.1