Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/hostsand 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

share|improve this question

Solved it myself. I was using underscores in my hostnames which isn't allowed. My bad.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.