Merge remote-tracking branch 'origin/4.15'

This commit is contained in:
Rohit Yadav 2021-05-31 16:04:42 +05:30
commit 57e4e3b6b1
3 changed files with 5 additions and 3 deletions

View File

@ -3536,7 +3536,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
final Answer rebootAnswer = cmds.getAnswer(RebootAnswer.class);
if (rebootAnswer != null && rebootAnswer.getResult()) {
if (dc.isSecurityGroupEnabled() && vm.getType() == VirtualMachine.Type.User) {
boolean isVmSecurityGroupEnabled = _securityGroupManager.isVmSecurityGroupEnabled(vm.getId());
if (isVmSecurityGroupEnabled && vm.getType() == VirtualMachine.Type.User) {
List<Long> affectedVms = new ArrayList<Long>();
affectedVms.add(vm.getId());
_securityGroupManager.scheduleRulesetUpdateToHosts(affectedVms, true, null);

View File

@ -4089,7 +4089,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
vm.setDetail(VmDetailConstants.FIRMWARE, "efi");
s_logger.info("guestOS is OSX : overwrite root disk controller to scsi, use smc and efi");
} else {
String controllerSetting = _configDao.getValue("vmware.root.disk.controller");
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);

View File

@ -2279,7 +2279,7 @@ public class HypervisorHostHelper {
Integer host1Version = getHostHardwareVersion(host1);
Integer host2Version = getHostHardwareVersion(host2);
if (host1Version != null && host2Version != null && !host1Version.equals(host2Version)) {
hardwareVersion = String.valueOf(Math.min(host1Version, host2Version));
hardwareVersion = VirtualMachineMO.getVmxFormattedVirtualHardwareVersion(Math.min(host1Version, host2Version));
}
}
return hardwareVersion;