Joining a cluster with already created guests VM

andrema2

New Member
Dec 7, 2020
18
0
1
50
Hi

I saw a video on youtube stating that we should have no guest VM when joining a cluster. I haven't found any mention of it in the documentation.

Is it really the case ?
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,684
992
163
see: https://pve.proxmox.com/pve-docs/chapter-pvecm.html#pvecm_join_node_to_cluster
A node that is about to be added to the cluster cannot hold any guests. All existing configuration in /etc/pve is overwritten when joining a cluster, since guest IDs could be conflicting. As a workaround create a backup of the guest (vzdump) and restore it as a different ID after the node has been added to the cluster.

meaning your current cluster can have guests defined, but a node, which you add to an existing cluster has to have no guests

I hope this explains it!
 

Gryd3

New Member
May 6, 2021
2
0
1
34
I have a work-around that *might* work for you, but has not been thoroughly tested.
There is a firm requirement however that there must not be any conflicts with the guest ID, or the node name.

On node1 (with guests)
Create a new cluster or get join information.

On node2 (with guests)
scp -r /etc/pve/nodes/* to node1:/etc/pve/nodes
rm -r /etc/pve/nodes/*
Join cluster.

Please realize there is potential for things to go sideways!
I've done this to re-assemble a cluster I've recently had to pick apart, and can't provide any details on long-term issues or risk.
I cannot suggest this work-around at the moment for nodes that have never been in a cluster with each other.
I've done this with online VMs! and they remain operational through the process. The join cluster process will overwrite the contents of /etc/pve/nodes with copies from the cluster... so copying your new node directory to the cluster with scp will indirectly restore it on cluster join.

Good luck.
 

Martin Fintan

Member
Mar 12, 2018
1
0
6
36
I have a work-around that *might* work for you, but has not been thoroughly tested.
There is a firm requirement however that there must not be any conflicts with the guest ID, or the node name.

On node1 (with guests)
Create a new cluster or get join information.

On node2 (with guests)
scp -r /etc/pve/nodes/* to node1:/etc/pve/nodes
rm -r /etc/pve/nodes/*
Join cluster.

Please realize there is potential for things to go sideways!
I've done this to re-assemble a cluster I've recently had to pick apart, and can't provide any details on long-term issues or risk.
I cannot suggest this work-around at the moment for nodes that have never been in a cluster with each other.
I've done this with online VMs! and they remain operational through the process. The join cluster process will overwrite the contents of /etc/pve/nodes with copies from the cluster... so copying your new node directory to the cluster with scp will indirectly restore it on cluster join.

Good luck.
I have tested 2 nodes from a broken cluster and it works.
 
May 21, 2020
26
0
6
33
This is limitation is super frustrating.
Why can't the cluster service just check all nodes whether VM IDs are really conflicting and provide the option to change the VM IDs when there are conflicts.
Does proxmox not use UUIDs as VM IDs internally? The VM ID number should only be a display name.
 

Gryd3

New Member
May 6, 2021
2
0
1
34
This is limitation is super frustrating.
Why can't the cluster service just check all nodes whether VM IDs are really conflicting and provide the option to change the VM IDs when there are conflicts.
Does proxmox not use UUIDs as VM IDs internally? The VM ID number should only be a display name.
Are you faced with a situation you can't work around? The process for this is to add 'fresh' installations to a cluster, and not to join 2 or more pre-existing nodes together.
Personally, it was annoying for my use case. As I had to tear down the cluster and re-assemble without dropping any guests, but I'm willing to bet that's a niche situation. I'm learning ProxMox at this point and did something stupid that required the tear-down.
I'm happy with the process of encouraging adding 'fresh' hosts to a cluster rather than trying to untangle any other dependencies that may be present by trying to incorporate a host with pre-existing VMs.
 

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 your own in 60 seconds.

Buy now!