No connectivity inside VM

Hi,

I am a beginner with LXD. I followed these steps:

Then I created a 24.04 vm. It runs OK, but has no network connectivity.

On my host:

$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:6f:ac:9d:8f txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp14s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 74:56:3c:4c:32:d7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.7 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fd9e:b078:24c0:eab:d4eb:9d6a:f7e3:dff4 prefixlen 64 scopeid 0x0
inet6 fd9e:b078:24c0:eab:200c:12b4:d53d:d4d prefixlen 64 scopeid 0x0
inet6 fe80::d45d:f57a:c758:2439 prefixlen 64 scopeid 0x20
ether 00:02:c9:51:a4:c0 txqueuelen 1000 (Ethernet)
RX packets 885041 bytes 1005932355 (1.0 GB)
RX errors 0 dropped 1574 overruns 2 frame 0
TX packets 396584 bytes 67361721 (67.3 MB)
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
loop txqueuelen 1000 (Local Loopback)
RX packets 48180 bytes 18265047 (18.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48180 bytes 18265047 (18.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lxdbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.228.26.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fd42:8922:8c70:86b8::1 prefixlen 64 scopeid 0x0
inet6 fe80::216:3eff:feef:c461 prefixlen 64 scopeid 0x20
ether 00:16:3e:ef:c4:61 txqueuelen 1000 (Ethernet)
RX packets 4369 bytes 375161 (375.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3635 bytes 528492 (528.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

mpqemubr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.128.75.1 netmask 255.255.255.0 broadcast 10.128.75.255
inet6 fe80::5054:ff:fea5:ac84 prefixlen 64 scopeid 0x20
ether 52:54:00:a5:ac:84 txqueuelen 1000 (Ethernet)
RX packets 62 bytes 5902 (5.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 281 bytes 47102 (47.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tap-5d49d8b073f: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::e8b5:deff:fe13:c2b0 prefixlen 64 scopeid 0x20
ether ea:b5:de:13:c2:b0 txqueuelen 1000 (Ethernet)
RX packets 75 bytes 7676 (7.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 335 bytes 55760 (55.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tap78c2720b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 5e:5f:c2:b4:30:e5 txqueuelen 1000 (Ethernet)
RX packets 743 bytes 73462 (73.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 621 bytes 89692 (89.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:a2:5c:1d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Inside the VM:

$ 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 noprefixroute
valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:16:3e:3c:0b:4e brd ff:ff:ff:ff:ff:ff
inet6 fd42:8922:8c70:86b8:216:3eff:fe3c:b4e/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe3c:b4e/64 scope link
valid_lft forever preferred_lft forever

$ lxc info noble
Name: noble
Status: RUNNING
Type: virtual-machine
Architecture: x86_64
PID: 88387
Created: 2025/02/06 12:35 MST
Last Used: 2025/02/06 12:53 MST

Resources:
Processes: 18
Disk usage:
root: 20.81MiB
CPU usage:
CPU usage (in seconds): 6
Memory usage:
Memory (current): 364.21MiB
Network usage:
enp5s0:
Type: broadcast
State: UP
Host interface: tap78c2720b
MAC address: 00:16:3e:3c:0b:4e
MTU: 1500
Bytes received: 167.75kB
Bytes sent: 134.59kB
Packets received: 1165
Packets sent: 1373
IP addresses:
inet6: fd42:8922:8c70:86b8:216:3eff:fe3c:b4e/64 (global)
inet6: fe80::216:3eff:fe3c:b4e/64 (link)
lo:
Type: loopback
State: UP
MTU: 65536
Bytes received: 95.10kB
Bytes sent: 95.10kB
Packets received: 1310
Packets sent: 1310
IP addresses:
inet: 127.0.0.1/8 (local)
inet6: ::1/128 (local)

$ lxc profile show default
name: default
description: Default LXD profile
config: {}
devices:
enp5s0:
name: enp5s0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
used_by:

  • /1.0/instances/noble

For some reason the enp5s0 does not have an IPv4 address.

I have been struggling with this for a few hours. Is there a description of the yaml format?

Thanks in advance for any help.

Regards,
Simon

Since you seem to have Docker also installed, please have a look at https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker.

Hi,

OK I removed docker and rebooted, but no dice.

I’d still like to understand things a little better. I changed my host machine to name my Ethernet eth0 but I’m not sure where to go to understand exactly what this yaml means:

lxc profile show default
name: default
description: Default LXD profile
config: {}
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
used_by:

  • /1.0/instances/noble

Regards,
SImon