Subject: Re: [vserver] Fail to ping guest hostname
From: Gilles Sadowski <gilles@harfang.homelinux.org>
Date: Sat, 30 Aug 2008 20:32:24 +0200

> > 
> > File "/etc/hosts" (on the host system) might be missing a line such
> > as:
> > 
> > 192.168.0.111   vserver1.satimis.com        vserver1
> 
> Thanks for your advice.
> 
> 
> I already have that line on /etc/hosts (Guest).  But it can't work.  I
> can't resolve why that line must be on /etc/hosts (Host) to make;
> 
> $ ping -c3 vserver1.satimis.com
> 
> work.  "192.168.0.111" is the local IP of the guest. 
> vserver1.satimis.com is hostname of the guest as well.
>

It must be on the host because the above command is executed on the host!
Did you try?

If this command works with the IP but not with the name, that means that it
is a name resolution problem.
If I'm not mistaken, unless you have configured your own DNS server for the
private network (192.168.x.x), it will not work.
[Anyways, the easiest way is to write all the relevant info in "/etc/hosts"
(on every machine (i.e. also vservers) that needs it.]
 
> 
> Also there is another line "192.168.0.1 vserver1.satimis.com" on
> /etc/hosts (Guest).  I suppose it was created when building the Guest. 
> I have no idea what is it for.  192.168.0.1 is the gateway on the
> router.  Could you please shed me some light?  TIA
> 

If this line is not right, remove it. [Or replace the wrong address with the
right one :-)]


Best,
Gilles