[Users] Re: finding out the HN name from inside the VC

Aleksandar Ivanisevic aleksandar at ivanisevic.de
Mon Mar 1 09:14:42 EST 2010


Michael Stauber <mstauber at blueonyx.it>
writes:

> Hi Aleksandar,
>
>> Is there a more elegant way of finding the host name or anything about
>> the host node from inside the container than scripting something in
>> /etc/vz/conf/vps.mount ?
>
> Don't know if it helps, but with the commands below you can at least fin out 
> the IP of the HN from inside a container:
>
> ping -t 1 -c 1 1.2.3.4 | grep exceed | cut -d " " -f 2

Heh, neat ;) Does this actually work with veth, too?



More information about the Users mailing list