/etc/hosts is using the IP of vmbr0 to resolve the fully qualified domain name

yatesco

Well-Known Member
Sep 25, 2009
211
5
58
Hi,

I have changed the IP address of my vmbr0 network device to be a local one (10.254.254.254) and my cluster broke.

After digging around it turns out that my /etc/hosts looks like:

Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1    localhost.localdomain localhost
10.254.254.254 XXX.ovh.net.ovh.net XXX.ovh.net pvelocalhost
# The following lines are desirable for IPv6 capable hosts
#(added automatically by netbase upgrade)
::1     ip6-localhost ip6-loopback
feo0::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

My eth0 (and eth0:0, eth0:1 and so on) nics all have the correct publicly visible IP addresses.

Changing /etc/hosts manually doesn't help as it is rebuilt on the next reboot.

How do I prevent /etc/hosts being rebuilt, or alternatively how do I tell /etc/hosts to use the IP address on eth0?

Surely using eth0 would be a better strategy anyway?

Ta.

Col
 
Hi,

I have changed the IP address of my vmbr0 network device to be a local one (10.254.254.254) and my cluster broke.

That behaviour is expected. When you want to change the IP or the hostname you need to remove the node from the cluster first, then add it again.

How do I prevent /etc/hosts being rebuilt, or alternatively how do I tell /etc/hosts to use the IP address on eth0?

You use the web interface to change the IP?
 
Hi dietmar,

That behaviour is expected. When you want to change the IP or the hostname you need to remove the node from the cluster first, then add it again.
The problem is that the two machines cannot communicate over 10.... They both have a single nic which has a public IP.

You use the web interface to change the IP?
Ah, no I didn't. I just edited /etc/network/interfaces directly.

Whilst we are discussing /etc/network/interfaces - I am also trying to assign multiple public IP addresses to eth0 - is it OK to just add eth0:0, eth0:1 etc.?

Thanks
 

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!