I’m using Proxmox 2.1, which is based on Debian 6, for my OpenVZ installation. Which shouldn’t matter but I wanted to mention it before I begin with my problem.
I imported several VEs into my newly set up Proxmox 2.1 installation. All the old hostnames were preserved, they work as expected.
But, when I set up a new VE using the Proxmox UI and set a hostname for them the hostname doesn’t show up in the VE. It shows the host’s hostname at the bash prompt. (user@host-hostname instead of user@ve-hostname)
When I restart the VE using the OpenVZ CLI tools, I get the following error:
hostname: the specified hostname is invalid
The /etc/hosts
and the /etc/hostname
do show the content I expected, the hostname is set properly.
When executing hostname -f
inside the VZ I get the following error:
hostname: Name or service not known
Solved it myself. I was using underscores in my hostnames which isn't allowed. My bad.