[SOLVED] Changed VMBR0 IP Address Before Setting Up Cluster and Experienced Issues

mhayhurst

Well-Known Member
Jul 21, 2016
108
5
58
43
Hello everyone,

I corrected this issue but wanted to share my experience with setting up a cluster following the Proxmox Wiki after I had already changed the IP address of vmbr0 on both Proxmox hosts. I installed Proxmox on two platforms with hostnames: proxmox1 and proxmox2. Both of the machine's IP addresses were set during the installation: proxmox1: 192.168.1.2 and proxmox2: 192.168.1.3. I set up a cluster using these two machines last night but a few weeks prior I had changed the IP addresses of proxmox1 to: 192.168.1.4 and proxmox2 to: 192.168.1.5 as well as performed a reboot on both machines. I did this through the Proxmox webgui by editing the vmbr0 IP address on both machines. I thought this would be all that was needed but apparently changing the vmbr0 in the webgui does not change the: /etc/hosts IP address. So when I went to setup the cluster I ran into errors with the corosync service. I also found that the: bindnetaddr in /etc/corosync/corosync.conf and /etc/pve/corosync.conf were both set to proxmox1's previous IP address (192.168.1.2). Also, changing the bindnetaddr in /etc/corosync/corosync.conf on both machines would not suffice as it reverts back to 192.168.1.2 after a reboot or service restart of corosync...even though I had changed the /etc/hosts on both machines to their new IP address. In the end I had to do the following on both machines:
  1. Change /etc/hosts on each machine to reflect their new IP address
  2. Executed:
    Code:
    service corosync stop
    Code:
    systemctl stop pve-cluster
    Code:
    pmxcfs -l
  3. Edited the bindnetaddr in /etc/corosync/corosync.conf & /etc/pve/corosync.conf on both machines to reflect the new IP address of: proxmox1 (192.168.1.4).
  4. I then rebooted both machines but was getting a: "Connection Error" in the webgui on proxmox2
  5. I checked in /var/log/syslog on proxmox2 and saw this error:
    Code:
    proxmox2 pveproxy[3120]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file or key) at /usr/share/perl5/PVE/HTTPServer.pm line 1626
  6. I was able to remedy this error by executing:
    Code:
    pvecm updatecerts
    and then I performed a reboot on proxmox2.
So here are my questions:
  1. Should changing the vmbr0 IP address in the webgui also update the /etc/hosts file?
  2. Why are there two corosync.conf files in two different locations?
  3. Is there anything else I should do on each machine as good measure considering the changes I made?
 
1. no, you have to update /etc/hosts manually
you the aim of /etc/hosts it to provide local name resolution
2. /etc/corsync/corosync.conf is used at boot and kept it sync afterwards with /etc/pve/corosync.conf
if you need to edit this file, have a look at http://pve.proxmox.com/pve-docs/chapter-pvecm.html#_corosync_configuration
3. if the output of
pvecm status
service pve-cluster status

are both OK you should be good with your changes
 
1. no, you have to update /etc/hosts manually
you the aim of /etc/hosts it to provide local name resolution
2. /etc/corsync/corosync.conf is used at boot and kept it sync afterwards with /etc/pve/corosync.conf
if you need to edit this file, have a look at http://pve.proxmox.com/pve-docs/chapter-pvecm.html#_corosync_configuration
3. if the output of
pvecm status
service pve-cluster status

are both OK you should be good with your changes

I thought I replied to this earlier but this fixed the problem, thank you!
 

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!