From 95a8308d53a468ed460330a97896fd0a8271df1c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Jul 2024 15:39:39 +0200 Subject: [PATCH] vmspawn: make "-n" just work The tap network device should be called "vt-", so that that the 80-vm-vt.network file we ship by default actually matches against it. Also, turn off any qemu callout stuff, networkd is smart enough to handle all this on its own, without ugly callouts. --- src/vmspawn/vmspawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index cb42085d76f..8fad195abcd 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1504,7 +1504,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { _cleanup_free_ char *tap_name = NULL; struct ether_addr mac_vm = {}; - tap_name = strjoin("tp-", arg_machine); + tap_name = strjoin("vt-", arg_machine); if (!tap_name) return log_oom(); @@ -1521,7 +1521,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { if (r < 0) return log_oom(); - r = strv_extendf(&cmdline, "tap,ifname=%s,script=no,model=virtio-net-pci,mac=%s", tap_name, ETHER_ADDR_TO_STR(&mac_vm)); + r = strv_extendf(&cmdline, "tap,ifname=%s,script=no,downscript=no,model=virtio-net-pci,mac=%s", tap_name, ETHER_ADDR_TO_STR(&mac_vm)); if (r < 0) return log_oom(); } else if (arg_network_stack == NETWORK_STACK_USER) -- 2.47.3