Skip to content

Instantly share code, notes, and snippets.

@oneohthree
Last active March 5, 2020 22:58
Show Gist options
  • Save oneohthree/1691652eaf611a2ee04d64cba961d7e5 to your computer and use it in GitHub Desktop.
Save oneohthree/1691652eaf611a2ee04d64cba961d7e5 to your computer and use it in GitHub Desktop.
systemctl stop pve*
nano /etc/hostname
nano /etc/hosts
hostnamectl set-hostname new_hostname
reboot
cp /var/lib/rrdcached/db/pve2-node/old_hostname /var/lib/rrdcached/db/pve2-node/new_hostname
cp /var/lib/rrdcached/db/pve2-storage/old_hostname /var/lib/rrdcached/db/pve2-storage/new_hostname
rm cp /var/lib/rrdcached/db/pve2-node/old_hostname
rm cp /var/lib/rrdcached/db/pve2-storage/old_hostname
service pve-cluster restart
mv /etc/pve/nodes/old_hostname/lxc/* /etc/pve/nodes/new_hostname/lxc
mv /etc/pve/nodes/old_hostname/qemu-server/* /etc/pve/nodes/new_hostname/qemu-server
rm -r /etc/pve/nodes/old_hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment