I’m using cloud-init to build my instances but I don’t appear to have any control over the network…
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: true
dhcp6: false
nameservers:
addresses:
- 10.51.2.11
- 10.51.2.12
- 10.254.225.1
search:
- cbl.local
- lxd
Is there way of prepending an additional DNS server to lxdbr0? or instance?
I think that if your network renderer is NetworkManager, then you use nmcli to make changes for your networking. NetworkManager will then create the netplan configuration for you.
In the end I right out the overriding settings into /etc/sysconfig/network-scripts/ifcfg-eth0 in a write_files section of cloud-init and it does what I need…
It has not been crystal clear what you are trying to achieve.
You mention RHEL9 instance. How do you get that? Did you make the image yourself? If so, care to share some info on how you created it?
If you want to setup cloud-init to autoconfigure your instances with certain DNS settings, do say so. In fact it appears in the end that this was a cloud-init question.
The RHEL9 instance is a custom, and a bit exotic. Could you first try this with a simpler case, like with images:fedora/40?
If you do not have yet incusbr0, you can create it now with
The image is centos/9-Stream/cloud but from memory the ifcfg-eth0 file is created by the distromanager rather than by cloud-init. So my assumption has always been that for centos the cloud-init portion was a ‘work around’.
cloud-init on this image is 23.4-19 which is pretty up to date…
I have a tight schedule so can’t play at the moment… hopefully soon…