Move nodes/vm’s after hostname change PVE

When you change the hostname of your proxmox host it can happen, that you can access the nodes and the vm’s. In the following steps is discriped how to move the vms’s to the new node.

After you changed the hostname, as described in this article. You can move the configuration files, as the pmxcfs has a few restrictions to ensure consistency you cannot rename non empty folders.

cp -r /var/lib/rrdcached/db/pve2-node/$OLDHOSTNAME/* /var/lib/rrdcached/db/pve2-node/$NEWHOSTNAME 
cp -r /var/lib/rrdcached/db/pve2-storage/$OLDHOSTNAME/* /var/lib/rrdcached/db/pve2-storage/$NEWHOSTNAME 

Make sure to remove the old directorys after this step.

Now you need to copy the configuration files of the old node to the new one

cp /root/OLDHOSTNAME/qemu-server/* /etc/pve/nodes/NEWHOSTNAME/qemu-server

After this you can reboot the server and the VM’s should now assigned to the new node.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert