|Right use of Hostname and Name [message #43025]
||Sun, 03 July 2011 11:26
Registered: July 2011
-----BEGIN PGP SIGNED MESSAGE-----|
We have some servers with some more OpenVZs installed. All running
Debian lenny, squeeze and lenny bpo.
Now we have some troubles with the Hostname and FQDN of some VZ's. In
the config files of all VZs is the HOSTNAME set to the FQDN. The NAME is
set to the Hostname of the host.
In some hosts we can now see, that /etc/hostname is the FQDN, in some
not. In the VZ's where in the /etc/hostname is the hostname, $(hostname
- -f) gives the FQDN... So i think some hosts have some problems with the
hostname and the real FQDN...
So what is the right usage of HOSTNAME and NAME in the VZ conf? where i
should use the FQDN and where just the hostname?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
|Re: Right use of Hostname and Name [message #43030 is a reply to message #43025]
||Tue, 05 July 2011 18:54
Registered: December 2005
Location: Bozeman, Montana
----- Original Message -----
> So what is the right usage of HOSTNAME and NAME in the VZ conf? where i
> should use the FQDN and where just the hostname?
vzctl's --name flag is just for vzctl so you can use a name rather than the ctid... just like hostnames are generally friendlier than IP addresses. It is really just a symlink in /etc/vz/names/ that points to the config. To the best of my knowledge, only vzctl allows you to use it... whereas, for example, vzmigrate does not.
The --hostname flag is for setting the hostname of the container. Where the value gets written into the container is distro specific. For example, in Red Hat / Fedora OS Templates, the value gets written to /etc/sysconfig/network. Other distros might expect it to be elsewhere.
The man page for vzctl is a little lean in the descriptions for --name and --hostname but I think it is clear enough.
704 Church Street
Belgrade, MT 59714
TYL, Scott Dowdle
Belgrade, Montana, USA