I have a Fedora 26 VM. When I log in to GNOME, it shows a connection to the network. GNOME shows the network profile for the device as "Connect automatically" and "Shared with all users" (in the Identity section). And I can SSH in to the VM... But sometimes I find I can't SSH in. Until after I log in on gdm (GNOME) first.
This doesn't happen if I reboot the VM. So I think it's happening when I suspend the host with the VM still running (but not logged in?).
What is happening in the VM when I log into GNOME, that causes it to re-connect? Is the connection loss a bug that can be fixed in the software?
systemctl status shows both NetworkManager and network.service as being in their OS-provided default state:
● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; generated; vendor preset: disabled) ● NetworkManager.service - Network Manager Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2017-09-17 17:43:48 BST; 1 day 15h ago
nmcli after login:
$ nmcli con NAME UUID TYPE DEVICE Wired connection 1 937653fb-890f-3b19-97b8-b98c8eafcdc5 802-3-ethernet ens3 virbr0 6e568806-d720-42ed-a555-0a1c50f1a36c bridge virbr0 ens3 afba101e-6470-3699-b87b-932ab4efe634 802-3-ethernet --
I can only find configuration files for the unused connection "ens3", which is for a previous device with a different MAC address. The VM is an upgraded clone of a Fedora 25 VM; presumably the MAC address was changed when cloned.
$ cd /etc/NetworkManager/system-connections/ && ls $ cd /etc/sysconfig/network-scripts/ && ls ifcfg-* ifcfg-ens3 ifcfg-lo $ cat ifcfg-ens3 HWADDR=52:54:00:A7:3B:22 TYPE=Ethernet BOOTPROTO=dhcp ... NAME=ens3 UUID=afba101e-6470-3699-b87b-932ab4efe634 ONBOOT=yes AUTOCONNECT_PRIORITY=-999 $ ip link show dev ens3 2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:59:9b:47 brd ff:ff:ff:ff:ff:ff