When I first start a Fedora LXC container created with the following command (or in the GUI) I get networking errors:
:
Here are the errors I get:
Here are some more fedora specific errors:
Attached is the
I also get similar issues on later versions of ubuntu, but Ubuntu 18 worked fine. For now I'm simply switching to centOS because its networking works and I can do everything I need on it but I wanted to leave this post here in case someone else hits this. I think the issue may have something to do with this setup script but I'm not sure
:
Code:
pct create 101 local:vztmpl/fedora-35-default_20211111_amd64.tar.xz --features mount=xfs --ostype fedora --storage=CTVM --unprivileged=0 --description "fedora glusterfs" --hostname fedoratest --password "password" --onboot 1 --net0 name=eth0,bridge=vmbr0
Here are the errors I get:
Code:
[root@pass ~]# ping 8.8.8.8
ping: connect: Network is unreachable
[root@pass ~]# ping 192.168.1.1
ping: connect: Network is unreachable
[root@pass ~]# ping localhost
PING localhost(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.019 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.011 ms
^C
--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1023ms
rtt min/avg/max/mdev = 0.011/0.015/0.019/0.004 ms
Here are some more fedora specific errors:
Code:
[root@pass ~]# networkctl up eth0
WARNING: systemd-networkd is not running, output will be incomplete.
[root@pass ~]# systemctl status systemd-networkd
× systemd-networkd.service - Network Service
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/systemd-networkd.service.d
└─lxc.conf
Active: failed (Result: exit-code) since Sat 2022-04-23 22:21:41 UTC; 8h ago
TriggeredBy: × systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
Process: 79 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=226/NAMESPACE)
Main PID: 79 (code=exited, status=226/NAMESPACE)
CPU: 1ms
Apr 23 22:21:41 pass systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=226/NAMESPACE
Apr 23 22:21:41 pass systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Apr 23 22:21:41 pass systemd[1]: Failed to start Network Service.
Apr 23 22:21:41 pass systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 5.
Apr 23 22:21:41 pass systemd[1]: Stopped Network Service.
Apr 23 22:21:41 pass systemd[1]: systemd-networkd.service: Start request repeated too quickly.
Apr 23 22:21:41 pass systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Apr 23 22:21:41 pass systemd[1]: Failed to start Network Service.
[root@pass ~]# networkctl list
WARNING: systemd-networkd is not running, output will be incomplete.
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback n/a unmanaged
2 eth0 ether n/a unmanaged
2 links listed.
[root@pass ~]# networkctl renew eth0
WARNING: systemd-networkd is not running, output will be incomplete.
Failed to connect system bus: Connection refused
Attached is the
journalctl -xeu systemd-networkd.service
output which shows:
Code:
Apr 23 22:21:41 pass systemd[79]: systemd-networkd.service: Failed to set up mount namespacing: Permission denied
Apr 23 22:21:41 pass systemd[79]: systemd-networkd.service: Failed at step
NAMESPACE spawning /usr/lib/systemd/systemd-networkd: Permission denied
░░ Subject: Process /usr/lib/systemd/systemd-networkd could not be executed░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The process /usr/lib/systemd/systemd-networkd could not be executed and
failed.
I also get similar issues on later versions of ubuntu, but Ubuntu 18 worked fine. For now I'm simply switching to centOS because its networking works and I can do everything I need on it but I wanted to leave this post here in case someone else hits this. I think the issue may have something to do with this setup script but I'm not sure
Attachments
Last edited: