I installed Ubuntu 18.04.4 for Raspberry Pi 4 with a network-config
file that describes my Wi-Fi networks. This file was automatically copied to /etc/netplan/50-cloud-init.yaml
.
However, the RPi did not connect to the network automatically.
When I ran sudo netplan --debug apply
it did connect (log below).
But I'd like to understand why it didn't work automatically in the first place, so I don't need console access to kick off the network connection for each device.
** (generate:1719): DEBUG: 18:47:11.874: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:1719): DEBUG: 18:47:11.875: starting new processing pass
** (generate:1719): DEBUG: 18:47:11.875: wlan0: adding wifi AP 'AccessPointA'
** (generate:1719): DEBUG: 18:47:11.875: wlan0: adding wifi AP 'AccessPointB'
** (generate:1719): DEBUG: 18:47:11.875: wlan0: setting default backend to 1
** (generate:1719): DEBUG: 18:47:11.875: Configuration is valid
** (generate:1719): DEBUG: 18:47:11.875: eth0: setting default backend to 1
** (generate:1719): DEBUG: 18:47:11.875: Configuration is valid
** (generate:1719): DEBUG: 18:47:11.876: Generating output files..
** (generate:1719): DEBUG: 18:47:11.877: NetworkManager: definition eth0 is not for us (backend 1)
** (generate:1719): DEBUG: 18:47:11.877: wlan0: Creating wpa_supplicant configuration file run/netplan/wpa-wlan0.conf
** (generate:1719): DEBUG: 18:47:11.877: Creating wpa_supplicant service enablement link /run/systemd/system/systemd-networkd.service.wants/netplan-wpa@wlan0.service
** (generate:1719): DEBUG: 18:47:11.878: NetworkManager: definition wlan0 is not for us (backend 1)
DEBUG:netplan generated networkd configuration changed, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:eth0 not found in {}
DEBUG:wlan0 not found in {}
DEBUG:Merged config:
network:
bonds: {}
bridges: {}
ethernets:
eth0:
dhcp4: true
optional: true
vlans: {}
wifis:
wlan0:
access-points:
AccessPointA:
password: asdf
AccessPointB:
password: asdf
dhcp4: true
optional: true
DEBUG:Skipping non-physical interface: lo
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for eth0
DEBUG:netplan triggering .link rules for wlan0
I do see this in /var/log/cloud-init-output.log
:
network_state.py[WARNING]: Wifi configuration is only available to distros withnetplan rendering support.
This message seems to come from this part of cloud-init.