Cant change DNS settings of LXC Debian containers

Vasilij Lebedinskij

Active Member
Jan 30, 2016
46
1
28
35
Hello! I'm trying to create OMV container and connect it to AD, but I can't change DNS setting from GUI. In GUI everything is set right (domain name and server) but in LXC /etc/resofv.conf still shows localdomain and dhcp dns server. This problem persist on Debian 9 and 10 templates but if I use ubuntu 18.04 template everything works fine.

Any ideas/workarounds?
 

H4R0

Active Member
Apr 5, 2020
524
109
43
You can run

Code:
touch /etc/.pve-ignore.resolv.conf

And then edit /etc/resolv.conf manually.
 

H4R0

Active Member
Apr 5, 2020
524
109
43
Code:
touch /etc/.pve-ignore.resolv.conf
must be done inside LXC or on host?

Inside the container.

Tried that in LXC but /etc/resolv.conf is still overwritten on reboot.

Then it's not proxmox fault.

There are some services like resolvconf which overwrite it at boot from /etc/network/interfaces.

Did you set the lxc to dhcp ? It can also be overwritten from dhcp.
 

Vasilij Lebedinskij

Active Member
Jan 30, 2016
46
1
28
35
Inside the container.



Then it's not proxmox fault.

There are some services like resolvconf which overwrite it at boot from /etc/network/interfaces.

Did you set the lxc to dhcp ? It can also be overwritten from dhcp.
Grrrrrr stupid dhcp... You were right - static ip solved my issue.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!