On 6/10/2017 2:29 PM, Michael Johnson wrote:

>> lxc config device add gentoo default nic nictype=bridged name=eth0 parent=br0 ipv4.address=192.168.0.36/24 ipv6.address=none

where "gentoo" is the container's Alias and "default" the profile used for the "gentoo" container?

actually this would be super useful as a short wiki kind article/topic on discuss.linuxcontainers.org <https://discuss.linuxcontainers.org> I guess



On 6/10/2017 2:29 PM, Michael Johnson wrote:
Here is the magic command:

lxc config device add gentoo default nic nictype=bridged name=eth0
parent=br0 ipv4.address=192.168.0.36/24 ipv6.address=none

Issue that after configuring eth0 in the container to have the same
static ip, and configuring a host bridge br0.

No 'lxc network create' nor 'lxc network attach' is needed.

I hope someone else finds this useful.

-Mike

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

---
This email has been checked for viruses by AVG.
http://www.avg.com

--
Gunnar Wagner | Yongfeng Village Group 12 #5, Pujiang Town, Minhang District, 201112 Shanghai, P.R. CHINA
mob +86.159.0094.1702 | skype: professorgunrad | wechat: 15900941702
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to