Add node with VMs to cluster

masgo

Well-Known Member
Jun 24, 2019
68
15
48
74
I have a single PVE node which has a few VMs and CT. I want to add it to an existing cluster. I know I could backup all VMs, remove them and reload from backup. But this is very time consumming. Is there another way to do it without moving so much data around?

The IDs do NOT overlap between node and cluster.
The storage name (local-zfs) is the same/will not change.
The PVE Version is the same on the cluster and the node (6.3-4)
 
Hi,
please proceed at your own risk!

As long as you only have local storage with matching names, what you can try is:
  1. on the new node, move the VM, container, firewall, etc. configuration files in /etc/pve/ to somewhere else
  2. join the cluster
  3. move the configuration files back to the now shared cluster filesystem in /etc/pve/
 
Last edited:
  • Like
Reactions: 8554650 and masgo
Thanks for your answer. I finally came around to try this and in the end it worked. It saved me several hours compared to the "traditional" approach of backup, delete, join cluster and restore.

It took a while because I was still testing the new cluster. Then Proxmox 7 came along and I upgraded the cluster to Proxmox 7 (which worked great btw.) and did some more testing. During this time the single node remained as it was, since it was hosting more "critical" VMs. Now I finally had the time to shut all VMs down, do a full backup of each, and then follow your instructions.

I had forgot that the single node was still running PVE 6 when I started. I guess that's the reason why joining the cluster failed. It was in a kind of limbo state where the cluster knew about it and the node knew about the cluster, but somehow they could not communicate. I then upgraded the node to PVE 7, but it was still not joined. Then I followed the documentation on how to remove a node and then simply rejoined the cluster. This time it worked.

The local storage had a slightly different naming in the cluster, so I had to do the zfs export/import renaming and alter the qemu .conf files accordingly. After that, I just copied the config files back, the VMs appeared, I started them and they work fine.

Some more infomration, if anyone want's to try this.
My single node had no containers, no firewall configuration, only ZFS storage, no users apart from root. I also made sure that the VM IDs where unique among all nodes.
 

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!