mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 02:22:52 +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 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…
x
Reference in New Issue
Block a user