Simplest way to solve this issue would be to add manually a nameserver to the /etc/resolv.conf file
.
This file is overwritten every time OS boots up so to make changes permament you need to add the nameserver at each boot.
This means adding this line at the end if your /etc/rc.local
file:
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
(I've used 1.1.1.1 as an example but feel free to use any other DNS for this).
Reboot the VM to check if the new DNS is being added to resolv.conf
. If so you can check if the service is using new DNS with resolvectl status
; you should see something simillar:
ssdfdf@mvn:~$ resolvectl status
Global
LLMNR setting: yes
MulticastDNS setting: yes
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Current DNS Server: 169.254.169.254
DNS Servers: 169.254.169.254
8.8.8.8
1.1.1.1
DNS Domain: c.xxxxx.internal
google.internal
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa