From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 905781FF0B3 for ; Wed, 28 Oct 2026 20:07:31 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 962F92126E; Wed, 28 Oct 2026 20:07:28 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 0/2] use configured serial as SCSI device ID Date: Wed, 28 Oct 2026 20:07:11 +0100 Message-ID: <20261028190713.2788477-1-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793214441576 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.225 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: OW3FCTM2L7COOV52QM6AJVTYLCOMG4FQ X-Message-ID-Hash: OW3FCTM2L7COOV52QM6AJVTYLCOMG4FQ X-MailFrom: m.koeppl@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since the switch to '-blockdev' with machine version 10.0, SCSI disks always get the drive name (e.g. 'drive-scsi1') as device ID, even if a serial is configured. The /dev/disk/by-id paths in the guest therefore no longer contain the serial, and in a guest running Proxmox VE, the disk list API endpoint does not report it either. 1/2 sets the device ID explicitly to the configured serial. Unlike QEMU's default, this also works for serials longer than 20 bytes. The change is tied to the new machine version 11.1+pve1, which only VMs with a SCSI disk with a serial require. 2/2 also adds cfg2cmd tests for both sides of the version check. Tested this on my local test node with explicitly set machine versions 11.1 and 11.1+pve1 as well as latest. Checked that serials longer than 20 bytes are accepted and the VM starts and that with versions older than 11.1+pve1, the drive name was used, as before. qemu-server: Michael Köppl (2): drive device: use configured serial as SCSI device ID test: cfg2cmd: add tests for SCSI disks with a serial src/PVE/QemuServer.pm | 7 +++-- src/PVE/QemuServer/DriveDevice.pm | 22 ++++++++++++-- src/PVE/QemuServer/Machine.pm | 6 ++++ src/test/cfg2cmd/scsi-serial-11.0.conf | 10 +++++++ src/test/cfg2cmd/scsi-serial-11.0.conf.cmd | 33 +++++++++++++++++++++ src/test/cfg2cmd/scsi-serial.conf | 10 +++++++ src/test/cfg2cmd/scsi-serial.conf.cmd | 34 ++++++++++++++++++++++ 7 files changed, 116 insertions(+), 6 deletions(-) create mode 100644 src/test/cfg2cmd/scsi-serial-11.0.conf create mode 100644 src/test/cfg2cmd/scsi-serial-11.0.conf.cmd create mode 100644 src/test/cfg2cmd/scsi-serial.conf create mode 100644 src/test/cfg2cmd/scsi-serial.conf.cmd Summary over all repositories: 7 files changed, 116 insertions(+), 6 deletions(-) -- Generated by murpp 0.12.1