/etc/hosts and bridged network

jburleson

Member
Apr 29, 2008
31
0
6
Jonesboro, AR
Not necessarily a bug, but I thought I would post this for others.

I created a vz container first without using a bridged network. When the container was created the hosts file was correctly created listing the ip address and the hostname I assigned to the container.

Later I reconfigure the container to use a bridged network and the hosts file was not updated to reflect the new ip address I assigned to the container. I did not change the hostname so I'm not sure if that would have caused it to re-write the hosts file or not. While this did not cause any trouble with connectivity, programs that read the hosts file will not get the correct information.

I manually editing the hosts file to reflect the correct ip address and then restarted the container to make sure that it was not reset. It was not.

As I mentioned at the beginning I do not think this is a bug, but I wanted to confirm that manually editing the hosts file on a bridged network is the correct think to do.
 
As I mentioned at the beginning I do not think this is a bug, but I wanted to confirm that manually editing the hosts file on a bridged network is the correct think to do.

Yes, I think thats the way. Its a bit clumsy, but we do not have any information about Guest IP/NET inside the host, so we can't do better.

- Dietmar
 

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!