Possible regression in PVE 9.2.x: unable to remove physical passthrough disks using "qm set --delete"

fmnamado

Member
Jan 13, 2023
16
7
8
Hi,

I think I may have found a regression in PVE 9.2.x regarding physical disk passthrough.

Environment
  • proxmox-ve: 9.2.0
  • pve-manager: 9.2.4
  • qemu-server: 9.2.0
  • pve-qemu-kvm: 11.0.2-1

For a long time I have been attaching and removing physical disks from VMs using:
Code:
qm set <vmid> -scsiX /dev/disk/by-id/<disk-id>

and later:
Code:
qm set <vmid> --delete scsiX

After upgrading to PVE 9.2.x, adding still works, but removing no longer works.

I reproduced the issue with a brand new VM.

Commands:
Code:
qm create 9999 --memory 512 --cores 1 --net0 virtio,bridge=vmbr0
qm set 9999 -scsi1 /dev/disk/by-id/ata-WDC_WD200EDGZ-<S/N-redacted>

This succeeds.

The VM is stopped:
Code:
qm status 9999
status: stopped

Removing the device:
Code:
qm set 9999 --delete scsi1

returns:
Code:
unable to apply pending change scsi1 : unable to parse volume ID '/dev/disk/by-id/ata-WDC_WD200EDGZ-<S/N-redacted>'
400 Parameter verification failed.

Instead of removing the device, the configuration becomes:
Code:
[PENDING]

delete: scsi1

The pending change cannot be applied anymore.
For comparison, using a normal Proxmox-managed disk works correctly:

Code:
qm set 9999 -scsi2 local-lvm:1
qm set 9999 --delete scsi2

This removes the disk successfully.

I also reproduced the exact same behaviour using the API:

Code:
pvesh set /nodes/<node>/qemu/9999/config --delete scsi1

which returns the same "unable to parse volume ID" error.


Is this a known regression in qemu-server 9.2.x, or has the recommended way of removing passthrough disks changed?
If this is a bug, I'm happy to open a Bugzilla report with any additional information required.

Thank you very much!
 
  • Like
Reactions: _gabriel and uzumo
Hey, thanks a lot for reporting this!

I have managed to reproduce the issue. As you mentioned, v8 does not seem to have this problem, but v9 does.

A build of the latest Git repositories also has this problem, so it has not yet been patched. What is strange, though, is that the issue seems to be a regex that has been in place since 2013.

I'll create a Bugzilla issue and send a patch for it soon.

Best Regards,
Thomas
 
Thank you very much for your time, and having been able to reproduce it.
And thank you for dealing with the bugzilla reporting.

I'll just wait for the fix to arrive in the future!
 
  • Like
Reactions: tomellm
Is it possible to post here some more info regarding do bugzilla and fix roadmap/expectation?
What will be the software part to be fixed?
Thank you :)
 
Definetly, you can find the Bugzilla issue here. Unfortunately, I cannot give you a definitive answer as to when it will be released.

The patch itself should be released and merged within the next few weeks, so you can always rebuild the `qm` executable yourself. However, I would recommend waiting for the release if you are concerned about stability.