From dd4d2c1cd1eb7c1f3163f6f922362af3189df0a3 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 21 Feb 2014 22:44:42 +0100 Subject: [PATCH] networkd/nspawn: enable dhcp client on veth device created in guest When starting systemd-nspawn with --network-veth, we create a veth device called host0 in the guest. Pick up on this and start a dhcp client on it. We will also pick up host0 netdevs created by other containers should they chose to use the same name. --- Makefile.am | 3 ++- network/80-container-host0.network | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 network/80-container-host0.network diff --git a/Makefile.am b/Makefile.am index 06997126860..647e993a5fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2464,7 +2464,8 @@ INSTALL_DIRS += \ $(sysconfdir)/udev/hwdb.d dist_network_DATA = \ - network/99-default.link + network/99-default.link \ + network/80-container-host0.network dist_udevrules_DATA += \ rules/99-systemd.rules \ diff --git a/network/80-container-host0.network b/network/80-container-host0.network new file mode 100644 index 00000000000..d49fba0d6ef --- /dev/null +++ b/network/80-container-host0.network @@ -0,0 +1,6 @@ +[Match] +Virtualization=container +Name=host0 + +[Network] +DHCP=yes -- 2.39.2