New CentOS 7 container "connect: Network is unreachable"

el_pedr0

Active Member
Aug 5, 2016
20
2
43
47
Hi,

I'm having major network difficulties with a fresh container install of CentOS 7 using the standard template and would welcome any help to resolve it.

I can connect via pct from the host, but I can't ping from the container, the response is:
Code:
[root@test ~]# ping 8.8.8.8
connect: Network is unreachable

If I try and ping the guest from the host, I get " Destination Host Unreachable"

In the guest, when I try:
Code:
[root@test ~]# systemctl restart network
Failed to get D-Bus connection: No such file or directory

Guest network config:
Code:
[root@test ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.19
NETMASK=255.255.255.0
GATEWAY=192.168.1.254

In the syslogs of the Proxmox host in the GUI, I see the following when I try and start the container:
Code:
Oct 07 22:19:37 toast.home.pmer.tk pvedaemon[2669]: <root@pam> starting task UPID:toast:0000245E:00003B56:615F6469:vzstart:119:root@pam:
Oct 07 22:19:37 toast.home.pmer.tk systemd[1]: Started PVE LXC Container: 119.
Oct 07 22:19:37 toast.home.pmer.tk pve-lxc-hook-lxc-pre-start[9387]: CT 119 does not support running in a pure cgroupv2 environment
Oct 07 22:19:37 toast.home.pmer.tk audit[9397]: AVC apparmor="STATUS" operation="profile_load" profile="/usr/bin/lxc-start" name="lxc-119_</var/lib/lxc>" pid=9397 comm="apparmor_parser"
Oct 07 22:19:37 toast.home.pmer.tk kernel: audit: type=1400 audit(1633641577.874:1813): apparmor="STATUS" operation="profile_load" profile="/usr/bin/lxc-start" name="lxc-119_</var/lib/lxc>" pid=9397 comm="apparmor_parser"
Oct 07 22:19:37 toast.home.pmer.tk systemd-udevd[9419]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Oct 07 22:19:37 toast.home.pmer.tk systemd-udevd[9419]: Using default interface naming scheme 'v247'.
Oct 07 22:19:38 toast.home.pmer.tk kernel: vmbr0: port 6(veth119i0) entered blocking state
Oct 07 22:19:38 toast.home.pmer.tk kernel: vmbr0: port 6(veth119i0) entered disabled state
Oct 07 22:19:38 toast.home.pmer.tk kernel: device veth119i0 entered promiscuous mode
Oct 07 22:19:38 toast.home.pmer.tk kernel: eth0: renamed from vethESajJU
Oct 07 22:19:38 toast.home.pmer.tk pvedaemon[2669]: <root@pam> end task UPID:toast:0000245E:00003B56:615F6469:vzstart:119:root@pam: WARNINGS: 1
Oct 07 22:19:38 toast.home.pmer.tk kernel: cgroup2: Unknown parameter 'mode'

When I double click to open a console on from the GUI, I am shown a black screen with 'Connected' at the top, but no log-in prompt. I can type characters into the console but they have no effect and I never get the console prompt that indicates a new line

Furthermore, I can't reboot or shutdown the guest - either from GUI or within the guest commandline:
Code:
[root@test ~]# reboot -h now
Failed to talk to init daemon.

[root@test ~]# shutdown -h now
Failed to talk to init daemon.

I'm running proxmox 7.0-11

Any help much appreciated.
 
Hmm. Getting very similar behaviour with a new CentOS 8 container.

In the past I have created both CentOS 7 and CentOS 8 containers and haven't had network or dbus issues. Though I can't be sure of what version of Proxmox that was with - it was a few weeks back.
 
Hi,

I'm having major network difficulties with a fresh container install of CentOS 7 using the standard template and would welcome any help to resolve it.

CentOS 7 runs quite an old software stack and its's systemd is rather old and cannot cope with the cgroup2 unified mode Proxmox VE 7.x defaults too. That's why you should get a warning like the following in the CT create task log:

Code:
WARN: old systemd (< v232) detected, container won't run in a pure cgroupv2 environment! Please see documentation -> container -> cgroup version.

So the CT userland just mostly does not run as the old systemd version (the service manager) cannot run.

See: https://pve.proxmox.com/pve-docs/chapter-pct.html#pct_cgroup_compat
 
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!