A new linux-VM takes ages to boot:
- it waits for 2 minutes for the network to come up

- Whats the reason for the delay?
„routable“ interfaces with not router-address provided by the dhcp-service never come up for the „networkd-wait-online“-service.
find more information at GitHub Issue 3752 – systemd-networkd can’t configure interface if dhcp server does not provide routers
administrator@lx-ubuntu:~$ networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 enp0s3 ether routable configuring 3 enp0s8 ether routable configured 3 links listed.
State: forever „configuring“ not „configured“
administrator@lx-ubuntu:~$ networkctl status enp0s3 2: enp0s3 Link File: /lib/systemd/network/99-default.link Network File: /run/systemd/network/10-netplan-enp0s3.network Type: ether State: routable (configuring) Path: pci-0000:00:03.0 Driver: e1000 Vendor: Intel Corporation Model: 82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter) HW Address: 08:00:27:37:db:ef (PCS Systemtechnik GmbH) Address: 192.168.56.101 fe80::a00:27ff:fe37:dbef
- Background information
„enp0s3“ is a virtual-box „host-only“ network with no routing provided
- Action Plan: „Set this interface to not be checked.“
- locate the systemd-unit-file:
- Edit (sudo) file
- add „ignore“-Option
Path: /run/systemd/generator/network-online.target.wants
File: systemd-networkd-wait-online.service
sudo vi /run/systemd/generator/network-online.target.wants/systemd-networkd-wait-online.service
The service specific configuration options are configured in the „[Service]“ section.
[Service] Type=oneshot ExecStart=/lib/systemd/systemd-networkd-wait-online --ignore=enp0s3 RemainAfterExit=yes
- reboot
Now the VM boots like lightning.