public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/2] drive device: scsi: avoid setting nonexistent 'device_id' for scsi-{block, generic}
Date: Wed, 13 Aug 2025 10:58:37 +0200	[thread overview]
Message-ID: <20250813085845.25516-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250813085845.25516-1-f.ebner@proxmox.com>

Fixes: 46d1225e ("drive device: fix regression with missing '/dev/disk/by-id' paths")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 99d4da4f..78cfad62 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1235,8 +1235,11 @@ sub print_drivedevice_full {
         }
         $device .= ",id=$drive_id";
 
-        # for the switch to -blockdev, the SCSI device ID needs to be explicitly specified
-        if (min_version($machine_version, 10, 0)) {
+        # For the switch to -blockdev, the SCSI device ID needs to be explicitly specified. Note
+        # that only ide-cd and ide-hd have a 'device_id' option.
+        if (
+            min_version($machine_version, 10, 0) && ($device_type eq 'cd' || $device_type eq 'hd')
+        ) {
             $device .= ",device_id=drive-${drive_id}";
         }
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-08-13  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  8:58 [pve-devel] [PATCH-SERIES qemu-server 0/2] fix scsi-{block, generic} with blockdev regressions Fiona Ebner
2025-08-13  8:58 ` [pve-devel] [PATCH qemu-server 1/2] fix #6680: avoid setting nonexistent 'write-cache' option for scsi-{block, generic} Fiona Ebner
2025-08-13 10:08   ` Fabian Grünbichler
2025-08-13 10:35     ` Fiona Ebner
2025-08-13  8:58 ` Fiona Ebner [this message]
2025-08-13 14:14 ` [pve-devel] applied: [PATCH-SERIES qemu-server 0/2] fix scsi-{block, generic} with blockdev regressions Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250813085845.25516-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal