]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: Use virtio-blk-pci for extra drives
authorNick Labich <nick@labich.org>
Wed, 8 Oct 2025 23:35:25 +0000 (19:35 -0400)
committerLennart Poettering <lennart@poettering.net>
Tue, 14 Oct 2025 14:09:51 +0000 (16:09 +0200)
Fixes #39262

src/vmspawn/vmspawn.c

index f471e1bde52ab2bd58338970a1a5a7f42902a188..14ff13c328de9afc0780a91bb196b6db4fb49af8 100644 (file)
@@ -2101,12 +2101,6 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
                         return log_oom();
         }
 
-        if (strv_length(arg_extra_drives) > 0) {
-                r = strv_extend_many(&cmdline, "-device", "virtio-scsi-pci,id=scsi");
-                if (r < 0)
-                        return log_oom();
-        }
-
         if (kernel) {
                 r = strv_extend_many(&cmdline, "-kernel", kernel);
                 if (r < 0)
@@ -2255,7 +2249,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
                 if (strv_extend(&cmdline, "-device") < 0)
                         return log_oom();
 
-                if (strv_extendf(&cmdline, "scsi-hd,drive=vmspawn_extra_%zu,serial=%s", i++, escaped_drive_fn) < 0)
+                if (strv_extendf(&cmdline, "virtio-blk-pci,drive=vmspawn_extra_%zu,serial=%s", i++, escaped_drive_fn) < 0)
                         return log_oom();
         }