[lxc-users] nat networking with fixed (dhcp ) IP addresses
Fajar A. Nugraha
list at fajar.net
Fri May 25 10:25:13 UTC 2018
On Fri, May 25, 2018 at 3:25 PM, Michel Jansens
<michel.jansens at 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".
--
Fajar
More information about the lxc-users
mailing list