mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
[VMware] Consider CD/DVD drive when calculating next free unit number for volume attachment over IDE controller (#9644)
Co-authored-by: dahn <daan.hoogland@gmail.com>
This commit is contained in:
parent
cf5bd80311
commit
e278bcd08a
@ -3169,9 +3169,12 @@ public class VirtualMachineMO extends BaseMO {
|
|||||||
|
|
||||||
int deviceCount = 0;
|
int deviceCount = 0;
|
||||||
int ideDeviceUnitNumber = -1;
|
int ideDeviceUnitNumber = -1;
|
||||||
if (devices != null && devices.size() > 0) {
|
if (devices != null) {
|
||||||
for (VirtualDevice device : devices) {
|
for (VirtualDevice device : devices) {
|
||||||
if (device instanceof VirtualDisk && (controllerKey == device.getControllerKey())) {
|
if (device.getControllerKey() == null || device.getControllerKey() != controllerKey) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (device instanceof VirtualDisk || device instanceof VirtualCdrom) {
|
||||||
deviceCount++;
|
deviceCount++;
|
||||||
ideDeviceUnitNumber = device.getUnitNumber();
|
ideDeviceUnitNumber = device.getUnitNumber();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user