sureshanaparti commented on code in PR #9433: URL: https://github.com/apache/cloudstack/pull/9433#discussion_r1688466265
########## server/src/main/java/com/cloud/vm/UserVmManagerImpl.java: ########## @@ -4650,16 +4650,25 @@ private void updateVMDiskController(UserVmVO vm, Map<String, String> customParam vm.setDetail(VmDetailConstants.DATA_DISK_CONTROLLER, dataDiskControllerSetting); } - String controllerSetting = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()), - Config.VmwareRootDiskControllerType.getDefaultValue()); - // Don't override if VM already has root/data disk controller detail if (vm.getDetail(VmDetailConstants.ROOT_DISK_CONTROLLER) == null) { - vm.setDetail(VmDetailConstants.ROOT_DISK_CONTROLLER, controllerSetting); + String vmwareRootDiskControllerTypeFromSetting = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()), + Config.VmwareRootDiskControllerType.getDefaultValue()); + vm.setDetail(VmDetailConstants.ROOT_DISK_CONTROLLER, vmwareRootDiskControllerTypeFromSetting); + if (vm.getDetail(VmDetailConstants.DATA_DISK_CONTROLLER) == null) { + if (vmwareRootDiskControllerTypeFromSetting.equalsIgnoreCase("scsi")) { + vm.setDetail(VmDetailConstants.DATA_DISK_CONTROLLER, "scsi"); + } + } Review Comment: ah, forgot to remove it. thanks for the review @winterhazel, will update. -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org