[SOLVED] Remove or reset cluster configuration.

Just so anyone who else stumbles on this from the internet like I did after botching my first attempt to create a cluster - DO NOT USE THIS SCRIPT. The line "rm -R /etc/pve/nodes" will delete all of your VMs and LXCs.
I came to this page looking how reset a cluster after failing to add a new node.
I have a cluster with a single node on it (my main server) and wanted to add a new node. I ran these commands on my main server hoping to clean up the cluster and start again, but didn't include the line
Code:
rm -R /etc/pve/nodes
as I didn't want to risk losing my existing LXCs.

There were no error messages when I ran the commands, however after rebooting the main proxmox node (the only one I've run any commands on):
  • My existing LXCs that are set to start on boot haven't started. In the task log, the task "Bulk start VMs and Containers" has a constant spinning status.
  • When I try to manually start a LXC, I get the error message `cluster not ready - no quorum? (500)`
  • When I try to start a shell on the node, I get the error message `undefined Code 1006` and in the task status, `Error: command 'usr/bin/termproxy 5900 --path /nodes/flanders --perm Sys Console -- /bin/login -f root` failed: exit code 1
How badly have I borked my node? Is this recoverable?
 
that sounds like your node still thinks it's part of a two-node cluster..

please provide

/etc/corosync/corosync.cfg
pvecm status
 
Hey ! I would like to give another answer, this worked for me in V 8.x.x,
thanks for the base script !:)


Bash:
systemctl stop pve-cluster corosync
pmxcfs -l
rm -R /etc/corosync/*
rm -R /etc/pve/nodes
killall pmxcfs
systemctl start pve-cluster
Okay i did this and it screwed up my node.

I now cant see my VMs and LXCs anymore however they appear to still be running since i can use all my services? How to fix this?

Thanks in advance!
 
Just so anyone who else stumbles on this from the internet like I did after botching my first attempt to create a cluster - DO NOT USE THIS SCRIPT. The line "rm -R /etc/pve/nodes" will delete all of your VMs and LXCs.
My dumb ass did this.. My VMs and LXCs are still running. Anyway to recover them?
 
My dumb ass did this.. My VMs and LXCs are still running. Anyway to recover them?
if you have backups, those contain a copy of the guest config that you can drop into /etc/pve/local/lxc or /etc/pve/local/qemu . else, you need to recreate the configs from the current running state and memory