Prerequisites
- Ubuntu 14.04 LTS (Trusty Tahr)
Steps
/var/lib/lxc/<container name>/config
for newly created container looks like following
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:aa:cc:9c
Because LXC not supports OVS add-port, so we have to remove following line
lxc.network.link = lxcbr0
And add following lines
lxc.network.script.up = /etc/network/if-up.d/lxc-ifup
lxc.network.script.down = /etc/network/if-down.d/lxc-ifdown
lxc.network.veth.pair = <ovs port name>