[Users] HOWTO: Propagate VE0 (Host) Hostname into VE's ?

Christian Hofstaedtler ch+openvz at zeha.at
Mon Jun 29 08:52:23 EDT 2009


Robert,

* Robert Heinzmann <Robert.Heinzmann at 1und1.de> [090629 14:43]:
> Hello,
> 
> I'm looking for a way to propagate the hostname of the VE0 a VE is
> running on (aka "The Host") into the VE environments (e.g. VE100). 

we're using this snippet to propagate some info from the host to all VEs:

--------------------
vnode02:~# cat /etc/vz/conf/vps.mount 
#!/bin/sh
cat /etc/hostname > /var/lib/vz/private/$VEID/etc/hnhostname
awk '/nameserver/{ print $2 }' /etc/resolv.conf > /var/lib/vz/private/$VEID/etc/hnnameserver
--------------------

Christian

-- 
christian hofstaedtler


More information about the Users mailing list