nvazquez commented on a change in pull request #5910:
URL: https://github.com/apache/cloudstack/pull/5910#discussion_r800058455



##########
File path: 
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -1805,6 +1805,14 @@ protected void ensureDiskControllers(VirtualMachineMO 
vmMo, Pair<String, String>
         int requiredNumScsiControllers = 
VmwareHelper.MAX_SCSI_CONTROLLER_COUNT - scsiControllerInfo.first();
         int availableBusNum = scsiControllerInfo.second() + 1; // method 
returned current max. bus number
 
+        if (DiskControllerType.getType(scsiDiskController) != 
scsiControllerInfo.third()) {
+            s_logger.debug(String.format("Change controller type from: %s to: 
%s", scsiControllerInfo.third().toString(),
+                    scsiDiskController));
+            vmMo.tearDownDevices(new Class<?>[]{VirtualSCSIController.class});
+            
vmMo.addScsiDeviceControllers(DiskControllerType.getType(scsiDiskController));

Review comment:
       Those cases are handled by the method 
`HypervisorHostHelper.getScsiController()` which sets the `scsiDiskController` 
value depending on the root and data disk controllers and the recommended 
controller.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to