[SOLVED] Proxmox Renaming

YaseenKamala

Member
Feb 2, 2021
158
4
23
Paris
Hello dears,

I would like to know how to rename the Proxmox hostname while we are having a VMs in it. To clarify my question I know how renaming process is done but I want to know what to do while I am having a VM already installed within the NODE and the reason I am asking this question because it's written on the official website "This must be done on a empty node."! see the introduction section https://pve.proxmox.com/wiki/Renaming_a_PVE_node

FYI:

I did that on a test environment I lost the VM which was installed.

Thanking in advance for any idea/support or help that you can provide
 

Attachments

  • prox.png
    prox.png
    13.4 KB · Views: 14
The reason why a rename should happen on an empty node is because the node name is used in the /etc/pve directory. If you do a ls -l /etc/pve, you will see that many directories are symlinks to /etc/pve/nodes/<nodename>/.... That's why you "lost" the VMs, you will have to copy over the config files to the new directory. For example from /etc/pve/nodes/<oldname>/qemu-server/*.conf to /etc/pve/nodes/<newname>/qemu-server/.
 
  • Like
Reactions: YaseenKamala
The reason why a rename should happen on an empty node is because the node name is used in the /etc/pve directory. If you do a ls -l /etc/pve, you will see that many directories are symlinks to /etc/pve/nodes/<nodename>/.... That's why you "lost" the VMs, you will have to copy over the config files to the new directory. For example from /etc/pve/nodes/<oldname>/qemu-server/*.conf to /etc/pve/nodes/<newname>/qemu-server/.
@aaron Thank you very much for you reply I really appreciated and I understood now why I lost the VMs. I am going to test that and will leave a comment in any case.


What I don't understand is once the name got changed how it's possible to relocate the config files to the new one? don't you think is better to make a backup of the config files first then do the process this way in case if I don't have them ( We are safe I can use the backup once!)

Again thank you so much. I wish you a very good day.
 
Last edited:
don't you think is better to make a backup of the config files first then do the process this way in case if I don't have them ( We are safe I can use the backup once!)
Of course that is better :)
 
  • Like
Reactions: YaseenKamala
Of course that is better :)

Hello again @aaron I followed your instructions just instead of "cp" I used "mv" command now I can see VMs are listed under the newname. however when I start the VM I got this error message "TASK ERROR: storage 'DATAPool' is not available on node 'gp1-test'"

I and I have checked the status of "DATAPool" it's OK and available in the GUI.

Any help is really appreciated again thanking you in advance :)
 
Last edited:
Hello again @aaron I followed your instructions just instead of "cp" I used "mv" command now I can see VMs are listed under the newname. however when I start the VM I got this error message "TASK ERROR: storage 'DATAPool' is not available on node 'gp1-test'"

I and I have checked the status of "DATAPool" it's OK and available in the GUI.

Any help is really appreciated again thanking you in advance :)


@aaron Thank you so much I managed it by modifying the /etc/pve/storage.cfg with newnode name! :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!