Hi i create lxd container, but child os do not have network.
my actions :
#install LXD
sudo snap install lxd
# init lxd
lxd init (all settings set by default)
#init child OS
lxc launch ubuntu:20.04 nextCloud
lxc exec nextCloud bash
#check network on child os
ping 8.8.8.8
ping: connect: Network is unreachable
My child os network status :
root@nextCloud:~# ip a
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
5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:0f:26:60 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::216:3eff:fe0f:2660/64 scope link
valid_lft forever preferred_lft forever
root@nextCloud:~# ip r
root@nextCloud:~#
My parent os network status:
enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.2 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::1a67:b0ff:fe3e:8104 prefixlen 64 scopeid 0x20<link>
ether 18:67:b0:3e:81:04 txqueuelen 1000 (Ethernet)
RX packets 12897 bytes 2826549 (2.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7335 bytes 669325 (669.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 264 bytes 20838 (20.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 264 bytes 20838 (20.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lxdbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.99.15.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::60a5:40ff:fe8a:42ef prefixlen 64 scopeid 0x20<link>
inet6 fd42:dbee:4b9f:45bf::1 prefixlen 64 scopeid 0x0<global>
ether ee:16:f1:7c:31:8c txqueuelen 1000 (Ethernet)
RX packets 242 bytes 69113 (69.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 105 bytes 18812 (18.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth6a859f40: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether ee:16:f1:7c:31:8c txqueuelen 1000 (Ethernet)
RX packets 242 bytes 72501 (72.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 97 bytes 17912 (17.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
andrei@q:~$ lxc network list
+--------+----------+---------+-------------+---------+
| NAME | TYPE | MANAGED | DESCRIPTION | USED BY |
+--------+----------+---------+-------------+---------+
| enp6s0 | physical | NO | | 0 |
+--------+----------+---------+-------------+---------+
| lxdbr0 | bridge | YES | | 1 |
+--------+----------+---------+-------------+---------+
| wlp3s0 | physical | NO | | 0 |
+--------+----------+---------+-------------+---------+
andrei@q:~$ lxc network show lxdbr0
config:
ipv4.address: 10.99.15.1/24
ipv4.nat: "true"
ipv6.address: fd42:dbee:4b9f:45bf::1/64
ipv6.nat: "true"
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/instances/nextCloud
managed: true
status: Created
locations:
- none
andrei@q:~$
andrei@q:~$ lxc list
+-----------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+------+------+-----------+-----------+
| nextCloud | RUNNING | | | CONTAINER | 0 |