[SOLVED] Change the ip-address of the Proxmox VE cluster

mugr

New Member
Jul 17, 2019
7
1
1
Hi! Help me, please!
My version of Proxmox VE 5.4-11. I made a Proxmox cluster (while there is only one node in the cluster).
When creating the default cluster, the external network interface was automatically used: ip 109.178.хх.хх \ 29
I needed to change the external ip address for the cluster to internal 192.168.1.5 in order for the cluster to work in the local network 192.168.1.0 \ 24
I did everything using these instructions: https://pve.proxmox.com/wiki/Cluster_Manager#_cluster_network and https://pve.proxmox.com/wiki/Cluster_Manager#pvecm_edit_corosync_conf
Everything seemed to work, "systemctl status corosync" did not say any errors.
But in the web interface in the section "Datacenter-> Cluster-> Join Information", as before, the old ip-address of the external network is indicated: 109.178.xxx.xx
How can this be changed? And it will affect the operation of the cluster functions?

My "corosync.conf":

Code:
logging {
  debug: off
  to_syslog: yes
}

nodelist {
  node {
    name: eldprx1
    nodeid: 1
    quorum_votes: 1
    ring0_addr: 192.168.1.5
  }
}

quorum {
  provider: corosync_votequorum
}

totem {
  cluster_name: EldisProxmox
  config_version: 2
  interface {
    bindnetaddr: 192.168.1.5
    ringnumber: 0
  }
  ip_version: ipv4
  secauth: on
  version: 2
}
 
Last edited:
My "/etc/hosts":
Code:
127.0.0.1   localhost.localdomain localhost
109.178.xx.xx   prx1.local   prx1 pvelocalhost
192.168.1.5   prx1.local   prx1 pvelocalhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

My "/etc/network/interfaces":
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug enp96s0f0
auto enp96s0f0
iface enp96s0f0 inet manual
   dns-nameservers 8.8.8.8
   dns-search local

allow-hotplug enp96s0f1
auto enp96s0f1
iface enp96s0f1 inet manual

auto vmbr0
iface vmbr0 inet static
   address  109.178.xx.xx
   netmask  29
   gateway  109.178.xx.xx
   bridge-ports enp96s0f0
   bridge-stp off
   bridge-fd 0

auto vmbr1
iface vmbr1 inet static
   address  192.168.1.5
   netmask  24
   bridge-ports enp96s0f1
   bridge-stp off
   bridge-fd 0
 
Can anyone help me with this problem please? What settings need to be made yet?
 
Can anyone help me with this problem please? What settings need to be made yet?

The IP Address shown in "Join Information" is not necessarily the one used for clustering, it's the one the other node will use to connect to it over the API during the join information.
This IP is normally the one the local nodename resolves too, if you want to change it you need to change "/etc/hosts" so that prx1 resolves only to the wanted IP (you currently havce multiple entries for that) and then restart "pve-cluster"
 
  • Like
Reactions: FabioMen10
Thanks for the answer!
But if I specify only one local entry in "/ etc / hosts" - "192.168.1.5 prx1.local prx1 pvelocalhost", then the web interface will also be available only at the local address 192.168.1.5:8006.
But I need the web interface to be available at the external address 109.178.xx.xx: 8006, and the cluster is connected and working at the internal local address 192.168.1.5. How can I do it?
I'm confused, sorry!
 
But if I specify only one local entry in "/ etc / hosts" - "192.168.1.5 prx1.local prx1 pvelocalhost", then the web interface will also be available only at the local address 192.168.1.5:8006.

No, the webaddress will be available on all address reachable, as long as those are not restricted by any firewall rule.

If you have the same name multiple times in /etc/hosts only the first is used anyway.
 
The address/network used for the nodename in /etc/hosts is just the default for most operations, for example live migration of VMs will be send over that one, Proxmox VE nodes will use this to talk with each other and redirect API request in a cluster, ...
 
So, I need to my "/etc/hosts" lead to the following form:

Code:
127.0.0.1   localhost.localdomain localhost
192.168.1.5   prx1.local   prx1 pvelocalhost
109.178.xx.xx   prx1.local   prx1 pvelocalhost

In this case, in the web interface in the section "Datacenter-> Cluster-> Join Information" will be the local address 192.168.1.5, and the management of the web interface will remain, as before, on the external address 109.178.xx.xx?
I understood correctly?
 
As said two entries with the same name have no use, the first found will always be used.

You could just remove (or rename) the second "prx1" entry and be also good.
 
As said two entries with the same name have no use, the first found will always be used.

You could just remove (or rename) the second "prx1" entry and be also good.
But then I will lose access to the web interface through the external address 109.178.xx.xx.
Sorry, I'm a little dumb! :)
 
But then I will lose access to the web interface through the external address 109.178.xx.xx.

No no, you really shouldn't lose access. We do not look at /etc/hosts to decide where the GUI and API listens on and is accessible, it is accessible from all addresses configured on a node, at least by default.
 
Last edited:
Thank you very much!
I changed the entries in "/etc/hosts", executed "service pve-cluster restart", and everything works well.
 
  • Like
Reactions: Bran-Ko

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!