Hostname Issue

mthaw

New Member
Feb 20, 2012
8
0
1
Hi,

i'am sorry to reopen an old discussion about the hostname problem.
I'am using the Proxmox 2 RC1 and i got confused by the settings of the openVZ-Containers.

The scenario:

When i set Hostname to "server1" and the DNS domain to "example.com", i expect that the command "hostname -f" in the guestOS will give me "server1.example.com".

In fact it gives only "server1" and domainname is empty. The file /etc/hostname is correct (only server1). The /etc/hosts file misses the FQDN-part.

If i set hostname to the FQDN (server1.example.com) and DNS Domain to the domain (example.com) everything is correct. The hosts file has the fqdn entry and /etc/hostname file has only the hostname.

So i think this is confusing. Maybe the set-hostname script must be changed, or the Backend should name this FQDN instead of HOSTNAME?!
 
I use debian6 and ubuntu 10.04/11.04 templates. Maybe it appears on all debian-Distro templates, because they are all handeld by the same script.

---
I've just tested it with suse and there is the same issue.
 
works here. give details about your Proxmox VE version (pveversion -v) and your template.
 
Code:
pve-manager: 2.0-38 (pve-manager/2.0/af81df02)
running kernel: 2.6.32-7-pve
proxmox-ve-2.6.32: 2.0-60
pve-kernel-2.6.32-6-pve: 2.6.32-55
pve-kernel-2.6.32-7-pve: 2.6.32-60
lvm2: 2.02.88-2pve1
clvm: 2.02.88-2pve1
corosync-pve: 1.4.1-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-1
pve-cluster: 1.0-23
qemu-server: 2.0-25
pve-firmware: 1.0-15
libpve-common-perl: 1.0-17
libpve-access-control: 1.0-17
libpve-storage-perl: 2.0-12
vncterm: 1.0-2
vzctl: 3.0.30-2pve1
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-5
ksm-control-daemon: 1.1-1

Code:
OSTEMPLATE="ubuntu-10.04-standard_10.04-4_amd64.tar.gz"
HOSTNAME="svn.example.com"
SEARCHDOMAIN="example.com"

With this settings it works fine. If i set HOSTNAME to "svn" (and that's what it should be) and not to the FQDN, than i got this problem e.g.

BTW: i've tested some templates and different OS, it happens all the time.
 
Oh, right - sorry for that.

And thanks a lot for this great software ;)
 
Last edited:
Now it is working when you set up a new container, but it is still not quite right.

I don't want to be fussy, BUT :)

You can now give the hostname and the Domainname seperate but at the end the hostname is still set to the FQDN.

It is confusing, because you name the field "Hostname" but it is the FQDN. There is a difference between them.
The hostname should contain the name of the host and the Domain is the Domain.

But thats OK for me!

Thanks for the fix
 
It is confusing, because you name the field "Hostname" but it is the FQDN. There is a difference between them.
The hostname should contain the name of the host and the Domain is the Domain.

Well, that is the current way openvz is working. hostname is used to setup /etc/hostname and /etc/hosts, and search domain is used to setup DNS.
 

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!