mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8119. [VMware] Cannot attach more than 8 volumes to a VM.
This commit is contained in:
parent
4d7ede535d
commit
b1bca2a2c0
|
|
@ -2323,7 +2323,7 @@ public class VirtualMachineMO extends BaseMO {
|
|||
|
||||
List<Integer> existingUnitNumbers = new ArrayList<Integer>();
|
||||
int deviceNumber = 0;
|
||||
int ideControllerKey = getIDEDeviceControllerKey();
|
||||
int scsiControllerKey = getScsiDeviceControllerKeyNoException();
|
||||
if (devices != null && devices.size() > 0) {
|
||||
for (VirtualDevice device : devices) {
|
||||
if (device.getControllerKey() != null && device.getControllerKey().intValue() == controllerKey) {
|
||||
|
|
@ -2334,7 +2334,7 @@ public class VirtualMachineMO extends BaseMO {
|
|||
while (true) {
|
||||
// Next device number should be the lowest device number on the key that is not in use and is not reserved.
|
||||
if (!existingUnitNumbers.contains(Integer.valueOf(deviceNumber))) {
|
||||
if (controllerKey != ideControllerKey && !VmwareHelper.isReservedScsiDeviceNumber(deviceNumber))
|
||||
if (controllerKey != scsiControllerKey || !VmwareHelper.isReservedScsiDeviceNumber(deviceNumber))
|
||||
break;
|
||||
}
|
||||
++deviceNumber;
|
||||
|
|
|
|||
Loading…
Reference in New Issue