<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Many thanks !<br>you get the point : the ip address configured in lxc config file is overwritten. <br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Thu, 10 May 2012 08:20:40 +0700<br>> Subject: Re: [Lxc-users] starting container requires re-login?<br>> From: list@fajar.net<br>> To: zhang_zhang@live.com<br>> CC: lxc-users@lists.sourceforge.net<br>> <br>> On Thu, May 10, 2012 at 8:17 AM, ÕÅÕ <zhang_zhang@live.com> wrote:<br>> > Many thanks<br>> ><br>> > I switch to Ubuntu 12.04 and use lxc-ubuntu to prepare my filesystem. Then I<br>> > add the network part to config file like:<br>> ><br>> > lxc.utsname = amd64<br>> > lxc.tty = 4<br>> > lxc.pts = 1024<br>> ><br>> > lxc.rootfs = /lxc/rootfs<br>> > lxc.mount  = /lxc/fstab<br>> > lxc.network.type = veth<br>> > lxc.network.flags = up<br>> > lxc.network.link = br0<br>> > lxc.network.name = eth0<br>> > lxc.network.ipv4 = 10.5.0.122/24<br>> ><br>> > lxc.cgroup.devices.deny = a<br>> > # /dev/null and zero<br>> > lxc.cgroup.devices.allow = c 1:3 rwm<br>> > lxc.cgroup.devices.allow = c 1:5 rwm<br>> > # consoles<br>> > lxc.cgroup.devices.allow = c 5:1 rwm<br>> > lxc.cgroup.devices.allow = c 5:0 rwm<br>> > #lxc.cgroup.devices.allow = c 4:0 rwm<br>> > #lxc.cgroup.devices.allow = c 4:1 rwm<br>> > # /dev/{,u}random<br>> > lxc.cgroup.devices.allow = c 1:9 rwm<br>> > lxc.cgroup.devices.allow = c 1:8 rwm<br>> > lxc.cgroup.devices.allow = c 136:* rwm<br>> > lxc.cgroup.devices.allow = c 5:2 rwm<br>> > # rtc<br>> > lxc.cgroup.devices.allow = c 254:0 rwm<br>> > #fuse<br>> > lxc.cgroup.devices.allow = c 10:229 rwm<br>> ><br>> > And now container can start , but the network fails to be configured with<br>> > the ip i assigned.<br>> > After i login to container, and get the ip like "inet addr:69.69.69.23 "<br>> ><br>> > Do i miss something?<br>> <br>> First of all, make sure you've configured br0 bridge properly.<br>> <br>> Second, the ip address configured in lxc config file can be overide<br>> inside the container (e.g. when you have static ip in<br>> /etc/network/interfaces), so I think that's what happened.<br>> <br>> -- <br>> Fajar<br></div>                                       </div></body>
</html>