I'm in the process of migrating our infrastructure to a more declarative, GitOps/terraform style. As a part of this, a lot of VMs will be created using customized cloud-init images (debian, fwiw).
Now the only thing missing for my little puzzle is to get networking right. When creating VMs manually, they get a lot of networking settings via DHCP (MTU, nameservers, VLAN ids, routing etc.). So far, I was unable to get the same up and running with cloud-init.
https://pve.proxmox.com/wiki/Cloud-Init_Support#_cloud_init_specific_options says that when I omit the ipconfig[n] options, ip configuration will be performed via DHCP. This works indeed, the VMs created via cloud-init get their IP addresses via DHCP, but that's all. Any other settings coming from DHCP are ignored, for example the nameservers. The nameservers are simply copied from the proxmox host to the created VM, which is pretty useless given the proxmox host is living in an entirely different network segment.
Any ideas how to get a cloud-init configured VM taking network settings via DHCP?
Now the only thing missing for my little puzzle is to get networking right. When creating VMs manually, they get a lot of networking settings via DHCP (MTU, nameservers, VLAN ids, routing etc.). So far, I was unable to get the same up and running with cloud-init.
https://pve.proxmox.com/wiki/Cloud-Init_Support#_cloud_init_specific_options says that when I omit the ipconfig[n] options, ip configuration will be performed via DHCP. This works indeed, the VMs created via cloud-init get their IP addresses via DHCP, but that's all. Any other settings coming from DHCP are ignored, for example the nameservers. The nameservers are simply copied from the proxmox host to the created VM, which is pretty useless given the proxmox host is living in an entirely different network segment.
Any ideas how to get a cloud-init configured VM taking network settings via DHCP?