[SOLVED] LXC dns from dhcp

belrpr

Member
Aug 9, 2017
48
5
6
39
Hi,

is there an option to get the dns settings from the dhcp server rather than manually putting it in or using the host defaults?

I've got a lot of vm's which are booted in a dmzand now.

Thx for the help!
 
Hi,

is there an option to get the dns settings from the dhcp server rather than manually putting it in or using the host defaults?

I've got a lot of vm's which are booted in a dmzand now.

Thx for the help!

I guess you are talking about containers, because PVE does not do the actual network setup inside VMs?

you can tell PVE to not touch the /etc/resolv.conf file (or equivalent, depending on guest distribution), then the network setup tools of the container should be able to use the information obtained via DHCP. but I guess that is highly dependent on the actual distro and tools used ;)
 
  • Like
Reactions: belrpr
There is a small typo in the file path from the previous command:
Code:
-.pve-ignore.resolve.conf
+.pve-ignore.resolv.conf

So the command to run is:
Code:
touch /etc/.pve-ignore.resolv.conf

And, because I did not find the information anywhere, this file must be created inside the container and not on the host system.
 

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!