From: Daan De Meyer Date: Fri, 18 Feb 2022 10:46:26 +0000 (+0000) Subject: Install a more specific match when --network-veth is used (#906) X-Git-Tag: v13~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afedb5b0ff3b3f67f44c5ead683cab0908f794d8;p=thirdparty%2Fmkosi.git Install a more specific match when --network-veth is used (#906) * Install a more specific match when --network-veth is used When doing more complicated network stuff in a QEMU VM, the network file we install starts matching stuff it shouldn't match. Let's narrow the match down by driver so we don't accidentally match against stuff we don't want to match against. Co-authored-by: Jörg Behrmann --- diff --git a/NEWS.md b/NEWS.md index 753451418..908c4b0d0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,16 @@ # mkosi Changelog +## v13 + +- The networkd config file installed by mkosi when the --network-veth option is + used (/etc/systemd/network/80-mkosi-network-veth.network in the image) now only matches against network interfaces using the virtio_net driver. + Please make sure you weren't relying on this file to configure any network + interfaces other than the tun/tap virtio-net interface created by mkosi when + booting the image in QEMU with the --network-veth option. If you were relying + on this config file to configure other interfaces, you'll have to re-create it + with the correct match and a lower initial number in the filename to make sure networkd will keep configuring your + interface, e.g. via the `mkosi.skeleton` or `mkosi.extra` trees or a `mkosi.postinst` script. + ## v12 - Fix handling of baselayout in Gentoo installations. diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 973e98dca..28538f44b 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -6924,6 +6924,7 @@ def setup_network_veth(args: MkosiArgs, root: Path, do_run_build_script: bool, c [Match] Virtualization=!container Type=ether + Driver=virtio_net [Network] DHCP=yes