Open Souldiv opened 9 months ago
Hi @Souldiv I moved over this issue to the Hyper-V repository and labeled it as an upstream change. Packer communicators currently don't support reconnecting after a IP change. If possible the workaround would be to reboot but configure the system with a static IP or increase the DHCP lease time to keep the same IP.
Thank you for the update!
So, I am trying to build an image of Ubuntu-22.04-server on Hyper-V using packer. Packer is able to do the initial SSH connection with machine after it is booted and provided with the pre-seed link, I haven't tried using a different builder but if I do not set the machine to reboot it runs till completion. I feel the issue is similar to hashicorp/packer#8528
I am running windows 11 and running packer through powershell. packer version: 1.9.4
Variables file:
Template:
Screenshots that may be of significance:
Successful initial SSH connection:
Failure to SSH after Provision Step 4, which is right after it completes the provision.sh script