]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer/Drive.pm
fix bootdisk_size for new bootorder config scheme
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 8 Mar 2021 13:43:38 +0000 (14:43 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 29 Apr 2021 14:15:33 +0000 (16:15 +0200)
commit30664f14ff21bda93956fe6d920c6dd5909d2de1
treebc3702e13a7283e98453dda1d2492cff382b2564
parent8f43ac4893e731381e891b09f08bdbbf0e909cb6
fix bootdisk_size for new bootorder config scheme

Previously, we ever only had a single boot *disk*, while possibly
having multiple cdroms/nics in the boot order

e.g. the config:

 boot: dnc
 bootdisk: scsi0
 ide0: media=cdrom,none
 scsi0: xxx
 net0: ...

would return the size of scsi0 even though it would first boot
from cdrom/network.

When editing the bootorder with such a legacy config, we
remove the 'bootdisk' property and replace the legacy notation
with an explicit order, but we only search the first disk
for the size now.

Restore that behaviour by iterating over all disks in the boot
order property string until we get one that is not a cdrom
and has a size.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QemuServer/Drive.pm