From: Lennart Poettering Date: Thu, 18 Jul 2024 13:39:39 +0000 (+0200) Subject: vmspawn: make "-n" just work X-Git-Tag: v257-rc1~876 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95a8308d53a468ed460330a97896fd0a8271df1c;p=thirdparty%2Fsystemd.git 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. --- 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)