Hai All,
I have question but this is only happen in my ubuntu server lastest version, in the other distro there is no problem, I can set up ip static in lxd container from bridge interface host os. I always setup bridge networking in host OS so my lxd/ lxc can have the same network address with host os and all computer in my lan.
I’ve installed ubuntu server lastest version in KVM, the host is Debian Bullseye with bridge network connected to guest VM(ubuntu server). in ubuntu server I’ve installed bridge network so I can use this bridge interface in lxd container profile. The quesion is why if i created profile example eksternal that contains bridged br0 or br1, the container didm’t received ip address, but when i remove profile eksternal from my container lxd, using default profile lxd, my container received ip addr? and this happen only in ubuntu server, I also use the same prosedur in Arch linux, redhat base and debian base is working normally, my container always received ip address and now I set my container in that machine with static Ip address.
I am new in this container, I don’t know how to solve this problem and maybe this information is useful for problem solving.
This my lxd version
$ lxd --version
4.20
this is my interface network in host os(Ubuntu Server):
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 52:54:00:fa:f2:aa brd ff:ff:ff:ff:ff:ff
3: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br1 state UP group default qlen 1000
link/ether 52:54:00:e3:11:84 brd ff:ff:ff:ff:ff:ff
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:fa:f2:aa brd ff:ff:ff:ff:ff:ff
inet 192.168.1.30/24 brd 192.168.1.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::1c55:4bff:fed7:9bd0/64 scope link
valid_lft forever preferred_lft forever
5: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:e3:11:84 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.35/24 brd 192.168.1.255 scope global br1
valid_lft forever preferred_lft forever
inet6 fe80::cf3:b2ff:fe31:9abc/64 scope link
valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:64:f5:6e:ef brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
7: lxdbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 00:16:3e:eb:82:5b brd ff:ff:ff:ff:ff:ff
inet 10.196.73.1/24 scope global lxdbr0
valid_lft forever preferred_lft forever
inet6 fd42:74af:80a9:ad97::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:feeb:825b/64 scope link
valid_lft forever preferred_lft forever
15: veth9eef6c85@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br1 state UP group default qlen 1000
link/ether d6:f0:b8:ca:bd:be brd ff:ff:ff:ff:ff:ff link-netnsid 0
This is my profile eksternal lxd container
config: {}
description: Ekternal Access Profile
devices:
eth0:
name: eth0
nictype: bridged
parent: br1
type: nic
name: eksternal
used_by:
- /1.0/instances/almalinux-cloud
This info from lxc info my container
$ lxc info almalinux-cloud
Name: almalinux-cloud
Status: RUNNING
Type: container
Architecture: x86_64
PID: 9182
Created: 2021/12/04 13:07 UTC
Last Used: 2021/12/04 13:12 UTC
Resources:
Processes: 14
Disk usage:
root: 782.96MiB
CPU usage:
CPU usage (in seconds): 18
Memory usage:
Memory (current): 88.23MiB
Memory (peak): 118.63MiB
Network usage:
eth0:
Type: broadcast
State: UP
Host interface: veth9eef6c85
MAC address: 00:16:3e:e0:39:d1
MTU: 1500
Bytes received: 23.89kB
Bytes sent: 6.82kB
Packets received: 366
Packets sent: 41
IP addresses:
inet6: fe80::216:3eff:fee0:39d1/64 (link)
lo:
Type: loopback
State: UP
MTU: 65536
Bytes received: 0B
Bytes sent: 0B
Packets received: 0
Packets sent: 0
IP addresses:
inet: 127.0.0.1/8 (local)
inet6: ::1/128 (local)
This SS my container got ip address after I remove eksternal profile from my container and use default profile. but with this profile my container cannot access directly from other computer or vm.
How to solve this problem? I’m sorry for my bad English, if you need furhter information, I’m ready to provide that for you.
Thanks You in Advance
Afiadi