cluster help

sahostking

Renowned Member
Hi

Want live migration but when I tried to create cluster I got this:

pvecm create vz-jhb
Corosync Cluster Engine Authentication key generator.
Gathering 1024 bits for key from /dev/urandom.
Writing corosync key to /etc/corosync/authkey.


I then ran pvecm status and noticed it was on public IP and not private IP.

Added no nodes to cluster at all except running "pvecm create vz-jhb"

I would like to get it on private network 10.0.0 range. I updated /etc/hosts now for that but what are the steps now.

Do I add nodes and will they automatically communicate over private network or did I mess up by running that first command "pvecm create vz-jhb" without first setting the hostnames in /etc/hosts correctly before doing it?
 
Hi,

Do I add nodes and will they automatically communicate over private network or did I mess up by running that first command "pvecm create vz-jhb" without first setting the hostnames in /etc/hosts correctly before doing it?

What version of Proxmox VE do you have, can you attach the output from
Code:
pveversion -v
?

I actually am unaware of the state of a separate Cluster network with Proxmox VE 3.4 or earlier as it has corosync 1.X and handles a few things a little different , but I implemented it for the PVE 4.X series so there it should work, the following thus also only is verified working (from my side) with PVE >= 4.0.

New parameters have been added to pvecm, you can see them with
Code:
pvecm help create
# or
man pvecm

If you do not specify those parameters we default to the IP and subnet of the Node, specified through /etc/hosts

You can change the address corosync (the cluster engine) listens to by editing /etc/pve/corosync open it with your favorite text editor (i use vim for that here) and change the "ring0_addr" parameter in the nodelist section to the wanted interface of the node(s) AND change the "bindnetaddr" value in the totem section to a address of the subnet you want to bind corosync.
Yours config could then look something like:
Code:
logging {
  debug: off
  to_syslog: yes
}

nodelist {
  node {
  name: node1
  nodeid: 1
  quorum_votes: 1
  ring0_addr: 10.0.0.1  # <----- change here
  }

}

quorum {
  provider: corosync_votequorum
}

totem {
  cluster_name: cosa-nostra
  config_version: 4
  ip_version: ipv4
  secauth: on
  token: 2000
  version: 2
  interface {
  bindnetaddr: 10.0.0.1  # <----- change here
  ringnumber: 0
  }

}

Save the file and do an
Code:
systemctl stop pve-cluster
systemctl restart corosync
systemctk start pve-cluster
(or reboot entirely)

After that you can add additional Nodes with a command similar to:
Code:
pvecm add <IP-from-Node-in-cluster> --ring0_addr 10.0.0.2

Some more details are also available here: https://pve.proxmox.com/wiki/Separate_Cluster_Network
If I over-complicated something say so, I'll try to re explain it better/simpler.
 
  • Like
Reactions: chrone