[Lxc-users] Howto detect the containers host
Papp Tamas
tompos at martos.bme.hu
Thu May 26 08:37:50 UTC 2011
On 05/26/2011 09:34 AM, Jäkel, Guido wrote:
> Hi all,
>
> something related to the "Howto detect we're a LXC Container" is the question: "Howto detect from inside a container the name (or something equivalent) of the machine we're hosted on?" This might be of interest for administration level scripts on setups like the one 'm going to use: It's a farm of identical hosts where I may start the prepared containers on any of it, because all of this stuff is using a nfs-rootfs.
>
>
> To be usable to run a isolated linx instance, at startup the uts information of the container is cloned from the host and the so-called nodename (which is availablie as 'hostname' or 'uname -n' at user level) is replaced by the value of lxc.utsname from config.
>
> Is there any possibility to let the container have access to the "original" nodename? Might it be made available on some procfs entry like /proc/lxc - together with some other informations?
I hope a container cannot identify its host.
tamas
More information about the lxc-users
mailing list