dualfroz 9f20cd4f75 fix #5998: import: avoid duplicate disk keys with multiple controllers
The disk key is built from the controller type and the address of the
disk on that controller. The address is only unique per controller, so
with more than one controller of the same type, like a VM with more than
16 disks spread over two SCSI controllers, several disks got the same
key. 'qm importovf' then failed with "cowardly refusing to overwrite
existing entry: scsi0", and the import wizard silently dropped all but
one of those disks, as they are stored in a hash by key.

Keep the address for the first disk using it and move any further disk
with the same address to the lowest address of that bus that is not
used by any other disk.

Add a test manifest with a second SCSI controller.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:38:19 +02:00
S
Description
My contributions to proxmox-git/pve-storage: 8 commits
101 KiB
0 Stars 1 Watchers 0 Forks
Languages
Perl 100%