How to change nameserver for VMs (ISP just changed)

fr0zt

New Member
Feb 9, 2024
8
1
3
I'm a relative beginner to proxmox, so appologies if this is simple. When I set up proxmox originally a year ago, I had used the default nameservers provided during proxmox setup from my ISP (Shaw - 64.59.144.91).

I've just changed ISPs (to Telus), and now I get name resolution errors, like

Code:
ping: google.com: Temporary failure in name resolution

To solve this, in Datacenter / proxmox / System / DNS, I saw where `64.59.144.91` is hardcoded and changed it to 8.8.8.8. I can now successfully ping google from the proxmox node's shell.

The issue is that on VMs, if I `cat /etc/resolv.conf`, I still see the old ISP nameserver. I tried `nano /etc/resolv.conf`, updating with 8.8.8.8, and then rebooting, but it repopulates with `64.59.144.91`

How can I fix the nameservers that get auto-populated to the proxmox node's virtual machines?

Edit: to add, in the VMs Cloud-Init settings, I have DNS domain and DNS servers both set to "use host settings"

Edit: also to add, the VM is running Debian 12

Edit: after a lot of searching and trial-and-error, I seem to have solved the issue by modifying the nameserver address on the VMs `/etc/netplan/50-cloud-init.yaml`, followed by `sudo netplan apply`. This seems to persist even after rebooting the VM, despite the disclaimer in `/etc/netplan/50-cloud-init.yaml` stating that it shouldn't persist after a reboot. Does anyone know what's going on here?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!