[SOLVED] Unable to change hostname

viperfan7

New Member
Jan 28, 2025
8
1
3
Hey, so I've got a weird one here.

For some reason, my proxmox node is using the hostname of the first VM ID ( 100, hostname: proxy )

Rather than it's own (pve)

I've shut off all containers and VMs, reduced the interface config to it's most basic, and made sure the hostname file contains only "pve"

As well, host is configured as such

Code:
127.0.0.1 localhost
192.168.1.2 pve pve.<redacted>.internal

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Any ideas?
 
cat /etc/hostname ? Should be shortname "pve" inside.
cat /etc/pve/.members ?
 
Last edited:
/etc/hostname is pve


Code:
> cat /etc/pve/.members                                                                                                                                                                                                                                  ─╯
{
"nodename": "pve",
"version": 0
}

Edit: I'm starting to think it's my router being weird, just ran lldpctl on it, since I have lldp setup on the host, and the sysname is correct.
 
Last edited:
Hello,

You need to edit both `/etc/hostname` and `/etc/hosts` to set the hostname then you could, for example, reboot the host for the changes to take into effect.
 
You need to edit both `/etc/hostname` and `/etc/hosts` to set the hostname then you could,
That's still right ... the kernel maybe get's at os runtime an update from "a proxy unit ??" to rename it from boottime "pve" to "proxy" by "hostname proxy" which could immedently changed back with "hostname pve" ... but where's the bug in the installation modifications ... ?!
 
Hello,

You need to edit both `/etc/hostname` and `/etc/hosts` to set the hostname then you could, for example, reboot the host for the changes to take into effect.
Both have been edited

I've also tried setting it up via Open vSwitch, and it doesn't even provide a hostname, just a MAC. when setup that way, but at least it's not the wrong hostname
 
@viperfan7 , One thing you have not explained yet is:
For some reason, my proxmox node is using the hostname of the first VM ID ( 100, hostname: proxy )
How did you determine this? How is this presented to you exactly? Can you post the commands and their full output using CODE tags?


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
@viperfan7 , One thing you have not explained yet is:

How did you determine this? How is this presented to you exactly? Can you post the commands and their full output using CODE tags?


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Purely based on what the hostname was within my router, no commands to list.

Within the host itself, everything (hostnamectl, hostname, cat /etc/hostname) shows the hostname to be pve

Mind you, I've since changed over to OVS to see if that changes anything, and this is what's happened

Code:
/etc/hosts

127.0.0.1 localhost localhost.localdomain
192.168.3.2 pve pve.vm.<redacted>.internal

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Code:
❯ hostnamectl                                                                                                                                                                                                                                               ─╯
 Static hostname: pve
       Icon name: computer-server
         Chassis: server 
      Machine ID: 04d311a5e8f54b818f417203c4bcbfc9
         Boot ID: e2e1db14f2bf4c9fb475fb3f6987beba
Operating System: Debian GNU/Linux 12 (bookworm) 
          Kernel: Linux 6.8.12-8-pve
    Architecture: x86-64
 Hardware Vendor: Supermicro
  Hardware Model: X9DRD-7LN4F_-JBOD_/X9DRD-EF
Firmware Version: 3.3

Code:
❯ hostname                                                                                                                                                                                                                                                  ─╯
pve

1739283873192.png
 
Last edited:
Where's your "problem shown your host using 'proxy' (instead of pve) as name" ?
 
Puh, when all on pve and in vm's is functioning ... let the router think what he wants ... life is short enough - have a nice day ! :cool: