Hi, I'been trying to get packer to create working templates for ubuntu 24.04 all day and I'm mostly there but I still have an issue with the networking. I am following the guide here.
At this point I can create a booting template, but when new VMs are created using the template they boot with the interface ens18 without link.

If I do:
So the problem must be somewhere either on packer configuration or the cloud-init
On the user data I added without much effect
Any ideas? I am coming from vmware where I have a setup similar to this and at this point I am a bit lost.
At this point I can create a booting template, but when new VMs are created using the template they boot with the interface ens18 without link.

If I do:
Then interface gets the IP address as expected from the dhcpip link set ens18 up
dhcpd
So the problem must be somewhere either on packer configuration or the cloud-init
On the user data I added without much effect
Attached are the logs that mention ethernet on the cloud-init.log, there's this line that looks suspicious but I don't know if it's relevant thoughnetwork:
version: 2
ethernets:
ens18:
dhcp4: true
network connectivity determined unnecessary for cloud-init's network stage. Reason: user data: cloud-config does not contain network requiring elements, vendor data: no configuration found, vendor data2: no configuration found
Any ideas? I am coming from vmware where I have a setup similar to this and at this point I am a bit lost.