Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
delete proxmox cluster
#/bin/sh
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
set -x
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# create update sql
cat <<EOM > /tmp/update.sql
delete from tree where name = 'corosync.conf';
.quit
EOM
# update sql
sqlite3 -echo /var/lib/pve-cluster/config.db < /tmp/update.sql
rm -f /tmp/update.sql
# remove directories
pmxcfs -l
rm /etc/pve/corosync.conf
rm /etc/corosync/*
rm /var/lib/corosync/*
rm -rf /etc/pve/nodes/*
rm /etc/pve/priv/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment