> On 25 May 2018, at 12:25, Fajar A. Nugraha <l...@fajar.net> wrote: > > On Fri, May 25, 2018 at 3:25 PM, Michel Jansens > <michel.jans...@ulb.ac.be> wrote: >> Thanks Fajar it works! >> >> What I did: >> >> #lets create a new profile >> lxc profile copy default nonet >> >> #remove network from the profile >> lxc profile device remove nonet eth0 >> >> #create the ’testip' container >> lxc init ubuntu:18.04 testip --profile nonet >> >> #attach the network device to it, with IP address >> lxc config device add testip eth0 nic nictype=bridged parent=lxdbr0 >> host_name=testip ipv4.address=10.0.3.203 > > > One note from me, you could actually use the default profile and > override eth0 directly in the config file. > At least it works with "lxc config edit", didn't try with "lxc config device”.
With lxc config device add, it looks like it does strange things: in "lxc network list-leases lxdbr0” I get 2 entries for the container, with the same Mac address and different IPs (one STATIC and ON DYNAMIC) and the twrong one is listed in lxc list… Michel > > -- > Fajar > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users