Dear Arun,
You may also use a DHCP environment to setup the containers network IP,
routing, DNS-Servers etc. This approach will ease any changes of the network
infrastructure and will help you to make your templates more generic. For that,
you have the to assign a fix MAC address to the container and to configure a
fixed parameter table (host/IP/MAC) at the dhcpd.
At my lxc-starter I'm using the formula
IP=$(gethostbyname $CONTAINER)
HWADDR=`IP=${IP#*.}; printf "00:50:C2:%02X:%02X:%02X" ${IP//./ }`
# a.b.c.d -> 00:50:C2:bb:cc:dd (hex)
[...]
lxc-start -n $CONTAINER [...] -s lxc.network.hwaddr=$HWADDR
Guido
>> >> My tactical work around was to inject the route add into
>> >> /etc/rc.d/rc.local
>> >> in the rootfs template for my LXC containers, so when I create each
>> >> container rc.local is staged, did the same with /etc/resolv.conf as well.
> > Hi,
> >
> > I am trying to add a default gateway inside a lxc container so that the
> > application can talk to outside network.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Lxc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-users