OpenVZ Forum

Home » Mailing lists » Users » Right use of Hostname and Name
Right use of Hostname and Name [message #43025] Sun, 03 July 2011 11:26 Go to next message
Sebastian Bachmann is currently offline  Sebastian Bachmann
Messages: 3
Registered: July 2011
Junior Member
Hash: SHA1

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?

Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla -

1DDPtwA2fc9P1FedtEyKAU37zR8PwuwDyBNA1CQGqY6Wvi+oCGY0zqhTl8+7 Q+F3
qbbXVINtrxGFY115hO9O1/lXt/R0zDF22APbVeyvFNRKHS6IFLDHSAp39Y34 fuXa
FbqyVfDyq+dnnn+MBVi8pIHxXOMMPJ+x5pbYsOufHJDrbDVCeU6FuUaOf4vn dFuo
NQuwq7bfoza18nBND8VksbCwD8iHLCW8p4vWhbQlmwvPGwF8baVCP9IABL9L zdcN
oABN9SH5IlPRRmtzzWeYG+14d42pE8WI7DahOAvu6duNcKMhWHrdSBbCK7+O G/s=
Re: Right use of Hostname and Name [message #43030 is a reply to message #43025] Tue, 05 July 2011 18:54 Go to previous message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member

----- 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.

Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]

TYL, Scott Dowdle
Belgrade, Montana, USA
Previous Topic: Migrating to OpenVZ from BSD jails
Next Topic: UDP socket buffer strategy for VoIP Service Containers
Goto Forum:

Current Time: Sun Apr 02 04:57:46 GMT 2023

Total time taken to generate the page: 0.01068 seconds