[systemd-devel] systemd-networkd and systemd-nspawn: missing host-side network

Kai Krakow hurikhan77 at gmail.com
Mon Apr 27 11:27:24 PDT 2015


Kai Krakow <hurikhan77 at gmail.com> schrieb:

Amended below...

> Hello!
> 
> I've created a container with systemd-nspawn, "machinectl enable"d it,
> then added machines.target to my default target (systemctl enable
> machines.target) so that containers will be autostarted on boot. That
> works so far.
> 
> But I discovered that systemd-networkd no longer configures my normal
> ethernet device during boot (it's configured as dhcp client). It just
> configures the ve-* device and that's it. After I manually restart
> networkd, all links are configured.
> 
> Steps to reproduce:
> 
> $ cat /etc/systemd/network/80-dhcp.network
> [Match]
> Name=en*
> [Network]
> DHCP=yes
> [DHCP]
> UseDomains=true
> 
> $ cat /etc/systemd/network/90-veth.network
> # This was added because otherwise after reboot, ve-XXXX is stuck in
> # mode "configuring" when looking at networkctl, it changes nothing
> # for the following behaviour, tho...
> [Match]
> Name=ve-*
> [Network]
> DHCP=no
> 
> $ machinectl enable test-machine
> $ systemctl enable machines.target
> $ systemctl reboot
> ...[rebooting]...
> 
> $ networkctl
> IDX LINK             TYPE               OPERATIONAL SETUP
>   1 lo               loopback           n/a         n/a
>   2 enp4s0           ether              n/a         n/a
>   3 sit0             sit                n/a         n/a
>   4 ve-XXXX          ether              routable    configured
> 
> $ ifconfig
> # shows only lo and ve-XXXX
> 
> $ systemctl restart systemd-networkd
> $ networkctl
> IDX LINK             TYPE               OPERATIONAL SETUP
>   1 lo               loopback           carrier     unmanaged
>   2 enp4s0           ether              routable    configured
>   3 sit0             sit                off         unmanaged
>   4 ve-XXXX          ether              routable    configured

I just discovered that I also need to restart the container from this point, 
otherwise I cannot ssh into the container. The connection just times out.

-- 
Replies to list only preferred.



More information about the systemd-devel mailing list