Skip to content

Instantly share code, notes, and snippets.

@nderjung
Created March 12, 2019 16:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nderjung/effd87cd8982728146669f1560d0dcd0 to your computer and use it in GitHub Desktop.
Save nderjung/effd87cd8982728146669f1560d0dcd0 to your computer and use it in GitHub Desktop.
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
pmxcfs -l
rm /etc/pve/corosync.conf
rm /etc/corosync/*
rm /var/lib/corosync/*
rm -rf /etc/pve/nodes/*
systemctl start pve-cluster
systemctl start corosync
systemctl start pve-cluster.service
systemctl start pvedaemon.service
systemctl start pvestatd.service
@foxt
Copy link

foxt commented Dec 10, 2022

DANGER: This will delete ALL of your container & virtual machine configurations, so unless you want to spend the next however long recreating everything, do not do this!

and even broke my ability to log into the box, at all.

This should really have a warning attached to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment