From: "Michael Köppl" <m.koeppl@proxmox.com>
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 [thread overview]
Message-ID: <20261028190713.2788477-1-m.koeppl@proxmox.com> (raw)
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
next reply other threads:[~2026-10-28 19:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 19:07 Michael Köppl [this message]
2026-10-28 19:07 ` [PATCH qemu-server 1/2] drive device: use configured serial as SCSI device ID Michael Köppl
2026-10-28 19:07 ` [PATCH qemu-server 2/2] test: cfg2cmd: add tests for SCSI disks with a serial Michael Köppl
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=20261028190713.2788477-1-m.koeppl@proxmox.com \
--to=m.koeppl@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.