Networking doesn't work on Fedora LXC container

michaellundquist7

New Member
Apr 24, 2022
3
0
1
When I first start a Fedora LXC container created with the following command (or in the GUI) I get networking errors:

:
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:
After allowing nesting (mentioned here) with the following:
Code:
pct create 101 local:vztmpl/fedora-35-default_20211111_amd64.tar.xz --features mount=xfs,nesting=1 --ostype fedora --storage=CTVM --unprivileged=0  --description "centos glusterfs" --hostname thorgluster --password "password" --onboot 1 --net0 name=eth0,bridge=vmbr0
Eth0 comes online in a degraded state:

Code:
[root@thorgluster ~]# networkctl status
●        State: degraded
  Online state: online
       Address: fe80::14d6:9eff:fec5:af46 on eth0

Apr 24 08:39:19 thorgluster systemd[1]: Starting Network Configuration...
Apr 24 08:39:19 thorgluster systemd-networkd[85]: lo: Link UP
Apr 24 08:39:19 thorgluster systemd-networkd[85]: lo: Gained carrier
Apr 24 08:39:19 thorgluster systemd-networkd[85]: Enumeration completed  
Apr 24 08:39:19 thorgluster systemd[1]: Started Network Configuration.    
Apr 24 08:39:19 thorgluster systemd[1]: Starting Wait for Network to be Configured...
Apr 24 08:39:19 thorgluster systemd-networkd[85]: eth0: Link UP              gured...
Apr 24 08:39:19 thorgluster systemd-networkd[85]: eth0: Gained carrier    
Apr 24 08:39:21 thorgluster systemd-networkd[85]: eth0: Gained IPv6LL    
Apr 24 08:39:21 thorgluster systemd[1]: Finished Wait for Network to be Configured.
I still can't ping anything but it seems like progress as I don't get errors from journalctl
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!