My Qubes broke again. Can't see network

total 20
drwxr-xr-x 2 root root 4096 Apr 19 14:26 .
drwxr-xr-x 7 root root 4096 Apr 19 14:26 ..
-rwxr-xr-x 1 root root  485 Apr 19 14:26 qubes-firewall-user-script
-rwxr-xr-x 1 root root  336 Apr 19 14:26 rc.local
-rw-r--r-- 1 root root  200 Apr 19 14:26 suspend-module-blacklist

I don’t know why your sys-net is missing this directory. Did you remove/change anything in it?
Check the Network Manager log:
sudo journalctl -u NetworkManager
You should see this line:
NetworkManager[10563]: <info> [1652880172.7579] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 30-qubes.conf, 31-randomize-mac.conf, no-mac-addr-change.conf)
So network manager read 30-qubes.conf at start.
30-qubes.conf content is this:

[Unit]
ConditionPathExists=/var/run/qubes-service/network-manager
# For /rw
After=qubes-mount-dirs.service
# For /var/run/qubes-service
After=qubes-sysinit.service
# For configuration of qubes-provided interfaces
After=qubes-network-uplink.service

[Service]
ExecStartPre=/usr/lib/qubes/network-manager-prepare-conf-dir

So with this config Network Manager should run /usr/lib/qubes/network-manager-prepare-conf-dir script at start. Its content is:

#!/bin/sh

# Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions

NM_CONFIG_DIR=/etc/NetworkManager/system-connections
if [ -d $NM_CONFIG_DIR ] && [ ! -h $NM_CONFIG_DIR ]; then
    mkdir -p /rw/config/NM-system-connections
    mv $NM_CONFIG_DIR/* /rw/config/NM-system-connections/ 2> /dev/null || true
    rmdir $NM_CONFIG_DIR
    ln -s /rw/config/NM-system-connections $NM_CONFIG_DIR
fi

# Do not manage xen-provided network devices
unmanaged_devices=mac:fe:ff:ff:ff:ff:ff
#for mac in `xenstore-ls device/vif | grep mac | cut -d= -f2 | tr -d '" '`; do
#    unmanaged_devices="$unmanaged_devices;mac:$mac"
#done
sed -r -i -e "s/^#?unmanaged-devices=.*/unmanaged-devices=$unmanaged_devices/" /etc/NetworkManager/NetworkManager.conf
sed -r -i -e "s/^#?plugins=.*/plugins=keyfile/" /etc/NetworkManager/NetworkManager.conf

exit 0

So at sys-net start you have /etc/NetworkManager/system-connections as directory but this script removes this directory and creates directory /rw/config/NM-system-connections and creates link to this directory /etc/NetworkManager/system-connections.
And in your sys-net somehow you have link /etc/NetworkManager/system-connections created but the /rw/config/NM-system-connections is not created or removed later.
I can only assume that you or some of your soft in sys-net removed this directory.
When you restart your sys-net the /rw/config/NM-system-connections/ directory is missing?

1 Like