I have installed lxd by using snap package in debian 10 buster. My host computer is connected via a LAN cable. I tried to use the default profile. But, my container does’t get any ipv4 from the “lxdbr0”.
From my container I see It uses the default profile
root@debian:~# lxc info debian-10 Name: debian-10 Location: none Remote: unix:// Architecture: x86_64 Created: 2020/11/01 20:12 UTC Status: Running Type: container Profiles: default Pid: 9180 Ips: lo: inet 127.0.0.1 lo: inet6 ::1 eth0: inet6 fd42:67b:89ca:313e:216:3eff:fe44:a847 veth2214a7cc eth0: inet6 fe80::216:3eff:fe44:a847 veth2214a7cc
Default profile
root@debian:~# lxc profile show default
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
name: default
used_by:
- /1.0/instances/debian-10
My default profile uses the bridge(“lxdbr0”) which was created during lxd init
I tried different things e.g
- lxc stop debian-10
- lxc network attach lxdbr0 debian-10 eth0 eth0
- lxc config device set debian-10 eth0 ipv4.address 10.153.186.10
- lxc start debian-10
I also tried to set manually (address, netmask etc)in my container /etc/network/interfaces to fix an ip
- auto eth0
- iface eth0 inet static
- address 10.153.186.10
- netmask ..**.
- gateway ...**
Unfortunately, nothing workout for me. Does anybody help me to figure out what I am doing wrong.?Thanks in advance.