From: Jörg Behrmann Date: Sun, 2 Mar 2025 15:07:54 +0000 (+0100) Subject: vmspawn: switch from -drive to -blockdev option X-Git-Tag: v257.4~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59f2d9b2cc05bb6d06c73bdd5eb42c8d187c9983;p=thirdparty%2Fsystemd.git vmspawn: switch from -drive to -blockdev option (cherry picked from commit 369655330d57a82b6f346a77798968f135221c99) --- diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 70e5a312656..8c00083258d 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1738,7 +1738,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { STRV_FOREACH(drive, arg_extra_drives) { _cleanup_free_ char *escaped_drive = NULL; - r = strv_extend(&cmdline, "-drive"); + r = strv_extend(&cmdline, "-blockdev"); if (r < 0) return log_oom(); @@ -1746,7 +1746,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { if (!escaped_drive) return log_oom(); - r = strv_extendf(&cmdline, "format=raw,cache=unsafe,file=%s", escaped_drive); + r = strv_extendf(&cmdline, "driver=raw,cache.direct=off,cache.no-flush=on,file.driver=file,file.filename=%s", escaped_drive); if (r < 0) return log_oom(); }