public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server 0/2] use configured serial as SCSI device ID
@ 2026-10-28 19:07 Michael Köppl
  2026-10-28 19:07 ` [PATCH qemu-server 1/2] drive device: " 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
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Köppl @ 2026-10-28 19:07 UTC (permalink / raw)
  To: pve-devel

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-28 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 19:07 [PATCH qemu-server 0/2] use configured serial as SCSI device ID Michael Köppl
2026-10-28 19:07 ` [PATCH qemu-server 1/2] drive device: " 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

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