Checking the Ubuntu full VM images (24.04 and 22.04) I notice that there's a resolv.conf written during image build:
https://github.com/threefoldtech/tf-images/blob/1a045e86c904b737cedf656cc8200fd76abec852/tfgrid3/ubuntu24.04/fullvm/ubuntu24-fullvm-flist-builder.sh#L30
This I would expect to be temporary, but in fact it is not cleaned up. So apps using resolv.conf inside deployed VMs will go directly to 1.1.1.1 and that server only.
On the other hand, systemd-resolved is already running when these images are deployed, and using it would be the normal thing to do in an Ubuntu machine. There are various advantages to using resolved and no obvious downside.
To change it, these lines would be added to the image build script, after all steps requiring DNS have been completed:
rm /etc/resolv.conf
ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Checking the Ubuntu full VM images (24.04 and 22.04) I notice that there's a
resolv.confwritten during image build:https://github.com/threefoldtech/tf-images/blob/1a045e86c904b737cedf656cc8200fd76abec852/tfgrid3/ubuntu24.04/fullvm/ubuntu24-fullvm-flist-builder.sh#L30
This I would expect to be temporary, but in fact it is not cleaned up. So apps using
resolv.confinside deployed VMs will go directly to1.1.1.1and that server only.On the other hand,
systemd-resolvedis already running when these images are deployed, and using it would be the normal thing to do in an Ubuntu machine. There are various advantages to usingresolvedand no obvious downside.To change it, these lines would be added to the image build script, after all steps requiring DNS have been completed: