[Lxc-users] problem in start lxc container

Binknight zheng_huabin at 163.com
Fri Sep 21 14:16:37 UTC 2012



many thanks,


I edit the container's /etc/rc.d/rc.sysinit and add :
     route add default gw 192.168.122.1 # address of virbr0
     echo >> /etc/resolv.conf nameserver 10.2.0.41 #name server the same as that in HOST's /etc/resolv.conf
then i can ping google successfully .



在 2012-09-21 21:15:07,"Huang Qiang" <allen303allen at gmail.com> 写道:
>On 2012/9/21 星期五 21:05, Binknight wrote:
>> 
>> hi Fajar,
>> 
>>     thank you for your advise and wiki, that provides a lot of useful informations.
>> 
>>     My test environment is FC16 and product environment is centos 6.3. So I have to set up lxc in FC or centos. I tested in centos and found that lxc-0.7.5 will work(I previously use the 0.8.0rc). Now I can ping the host from my container and vice versa, but I can not access to other networks(eg. ping www.google.com <http://www.google.com> will fail). My network configure is,
>> 
>> lxc.network.type = veth
>> lxc.network.flags = up 
>> lxc.network.link = virbr0 
>> lxc.network.name = eth0 
>> lxc.network.mtu = 1500 
>> lxc.network.ipv4 = 192.168.122.2/24
>> 
>> the bridge "virbr0" is create automatically by install libvirt.
>> 
>
>Did you set your ip route in the container?
>You need to set it the same as your host.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120921/9e06b7a7/attachment.html>


More information about the lxc-users mailing list