add node that conatins vm's to cluster

C

costexx

Guest
Hi!
I have a proxmox cluster and another proxmox 2.0 server that contains vm's.
The id's of the vm's do not overlap. If i want to add this node to cluster it won't let me because "this host already contains virtual machines - please remove the first".
So is there a way to overcome this?(besides moving them by hand ...)
 
  • Like
Reactions: Zaman
no, you need to move them by hand.

Hi Dietmar, I just ran into this issue myself. If the reasoning is that you cannot add a node with existing VM's to a cluster because of potential problems with overlapping VMID's why can one not add a node with non overlapping VMIDs for example Node A = has no VM's Node=B has 6 VM's. there is therefore no overlap. If this is not the case, why not? It would be great to have this since it would greatly ease upgrading environments.

Also would a workaround be to create the cluster on a node with existing VM's and then add a node with NO VM's?
 
Hi Dietmar, I just ran into this issue myself. If the reasoning is that you cannot add a node with existing VM's to a cluster because of potential problems with overlapping VMID's

Ther are also other overlapping configuration file (storage.cfg for example)
 
Ther are also other overlapping configuration file (storage.cfg for example)

OK understood.

so in the above case scenario ( node A no VM's Node B 6 VM's )I would create the cluster on the Node with active VM's and then add the Node with no VM's correct?

Or would any new cluster creation have to occur on an node with no VM's?

Also .. if I have already created a cluster on Node A but have not added any Nodes to the cluster, can I remove the cluster form Node A and start over or would I have to re-install NODE A from scratch?
 
so in the above case scenario ( node A no VM's Node B 6 VM's )I would create the cluster on the Node with active VM's and then add the Node with no VM's correct?

yes

Also .. if I have already created a cluster on Node A but have not added any Nodes to the cluster, can I remove the cluster form Node A and start over or would I have to re-install NODE A from scratch?

What for?
 
yes



What for?

Because I currently can't add Node B to the cluster because it contains 6 VM's, I don't want to move the VM's manually to NODE A and then Add Node B. I want to recreate the cluster on NODE B and then add NODE A (empty Node) to the cluster and use live migration to to move the VM's. To do this I have to remove the cluster from Node A. Is there a command to remove the cluster completely if not I will just re-install NODE A.
 
Hi Dietmar, I just ran into this issue myself. If the reasoning is that you cannot add a node with existing VM's to a cluster because of potential problems with overlapping VMID's why can one not add a node with non overlapping VMIDs for example Node A = has no VM's Node=B has 6 VM's. there is therefore no overlap. If this is not the case, why not? It would be great to have this since it would greatly ease upgrading environments.

Also would a workaround be to create the cluster on a node with existing VM's and then add a node with NO VM's?

The scripts that kick in when you try join a cluster will prevent you from adding a machine that has existing VM's. If you try and force it, the .conf files for the existing VM's will get trashed, and you will be forced to restore from a backup even though the VM will be still running until you reboot. It's safer just to make sure the machine has no existing VM's.
 
I recently force a node D (proxmox 2.2) with 1 CT to join a cluster of 3 others nodes (A,B,C proxmox 2.0) with CTs on each nodes. Like you said, conf file of the CT on node D disappear. I resend on node D an old conf file that i have for this CT on another physical server (on proxmox 1.9) and the CT reappear in the web interface. But if i see now the CT in the web interface, i can't do nothing with it cause i obtain a looping login box "Permission denied Invalid Ticket 401". On other way i can't login on web interface directly on node D (same looping login box).

You said VM still running until reboot. I'm afraid. In my case, is it true the CT stop working after reboot ? And what is the best way to clean this situation ?

Note : I didn't have the message "this host already contains virtual machines - please remove the first". Even though i checked the CT id of the node D wasn't defined on the cluster before to force join with pvecm add IP-MASTER -force.

Edit : Finaly a simple reboot of the node solved the problem.
 
Last edited:
Awesome answers & questions, also ran into this situation, Thanks for the post.
 
Hello All,
I am having this challenge where I need to add node to a cluster Node a (which has the cluster) is fresh no vms, node b has two vms.
I am getting this error when I try to add the node.
"This host already contains virtual guests"
 
You cannot add a node when it already contains guests.

Note: You need to run "pvecm add ..." on the new node (the one without VMs).
 
Can't we just turn off node B vm's. Copy each machine config file to safe place.
Add the Node B to cluster. Add Node B storage (since it will be wiped). Copy back machine config files.
All working, without backup/restore?

This is assuming, that vm id's won't overlap

Would seem like pretty straightforward?
 
Can't we just turn off node B vm's. Copy each machine config file to safe place.
Add the Node B to cluster. Add Node B storage (since it will be wiped). Copy back machine config files.
All working, without backup/restore?

This is assuming, that vm id's won't overlap

Would seem like pretty straightforward?

I can confirm that this works without any issues! :)
 
Yes (the new node needs to be empty).
What about if I
-backup the VM first and delete it afterwards by also checking Purge from job configurations and Destroy unreferenced disks owned by guest
-join the node to cluster and restore the VM afterwards?
What if the backed up VM on node B has the same id number as another VM on node A? Would a workaround be the create a backup of the guest (vzdump) and restore as a different ID after the node has been added to the cluster?

PS Is this info valid, the storage on the node to be added will be wiped? Why is that? So the node not only has to have no VMs but also no storage at all configured?
 
Last edited:

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!