[SOLVED] WTF? Strange behavior when renaming a host.

TErxleben

Renowned Member
Oct 20, 2008
216
11
83
I renamed a pve (8.4.1) with four VMs from pve1 to pve2 by changing the hostname via CLI (/etc/hostname), which was always sufficient so far.

Now I have both pve1 and pve2 in the WebGUI.

(Actually, it's sensible and I've already expressed a wish: to be able to display multiple hosts in the data center without running a cluster.)

Unfortunately, the four VMs set up under pve1 still appear under the "ghost host" pve1 after renaming and are logically unavailable.
 
I'd recommend doing something like find /etc -type f -print0|xargs -0 grep -l pve1 and manually reviewing that list. There probably are a few more files that need to be edited. For instance, files like /etc/pve/corosync.conf or /etc/pve/.members would be prime candidates. And of course, everything in /etc/pve/nodes needs to be renamed, too.

These are files that are managed by PVE, though. So, blindly editing them could have surprising effects. I have not tried to go through renaming a node to see what else might break in the process. There is a good chance you make things worse before you make it better.
 
  • Like
Reactions: UdoB
  • Like
Reactions: zodiac
I renamed a pve (8.4.1) with four VMs from pve1 to pve2 by changing the hostname via CLI (/etc/hostname), which was always sufficient so far.

Now I have both pve1 and pve2 in the WebGUI.

(Actually, it's sensible and I've already expressed a wish: to be able to display multiple hosts in the data center without running a cluster.)

Unfortunately, the four VMs set up under pve1 still appear under the "ghost host" pve1 after renaming and are logically unavailable.
This is the expected behavior since 2.0, nothing new.

Please use a meaningful subject of your thread, this can reduce the risk of getting banned here.