mirror of https://github.com/apache/cloudstack.git
[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 ideDeviceUnitNumber = -1;
|
||||
if (devices != null && devices.size() > 0) {
|
||||
if (devices != null) {
|
||||
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++;
|
||||
ideDeviceUnitNumber = device.getUnitNumber();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue