Skip to content

Commit 57e4e3b

Browse files
committed
Merge remote-tracking branch 'origin/4.15'
2 parents b104aca + fbc8610 commit 57e4e3b

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3536,7 +3536,8 @@ private void orchestrateReboot(final String vmUuid, final Map<VirtualMachineProf
35363536

35373537
final Answer rebootAnswer = cmds.getAnswer(RebootAnswer.class);
35383538
if (rebootAnswer != null && rebootAnswer.getResult()) {
3539-
if (dc.isSecurityGroupEnabled() && vm.getType() == VirtualMachine.Type.User) {
3539+
boolean isVmSecurityGroupEnabled = _securityGroupManager.isVmSecurityGroupEnabled(vm.getId());
3540+
if (isVmSecurityGroupEnabled && vm.getType() == VirtualMachine.Type.User) {
35403541
List<Long> affectedVms = new ArrayList<Long>();
35413542
affectedVms.add(vm.getId());
35423543
_securityGroupManager.scheduleRulesetUpdateToHosts(affectedVms, true, null);

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4089,7 +4089,8 @@ public UserVmVO doInTransaction(TransactionStatus status) throws InsufficientCap
40894089
vm.setDetail(VmDetailConstants.FIRMWARE, "efi");
40904090
s_logger.info("guestOS is OSX : overwrite root disk controller to scsi, use smc and efi");
40914091
} else {
4092-
String controllerSetting = _configDao.getValue("vmware.root.disk.controller");
4092+
String controllerSetting = StringUtils.defaultIfEmpty(_configDao.getValue(Config.VmwareRootDiskControllerType.key()),
4093+
Config.VmwareRootDiskControllerType.getDefaultValue());
40934094
// Don't override if VM already has root/data disk controller detail
40944095
if (vm.getDetail(VmDetailConstants.ROOT_DISK_CONTROLLER) == null) {
40954096
vm.setDetail(VmDetailConstants.ROOT_DISK_CONTROLLER, controllerSetting);

vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2279,7 +2279,7 @@ public static String getMinimumHostHardwareVersion(VmwareHypervisorHost host1, V
22792279
Integer host1Version = getHostHardwareVersion(host1);
22802280
Integer host2Version = getHostHardwareVersion(host2);
22812281
if (host1Version != null && host2Version != null && !host1Version.equals(host2Version)) {
2282-
hardwareVersion = String.valueOf(Math.min(host1Version, host2Version));
2282+
hardwareVersion = VirtualMachineMO.getVmxFormattedVirtualHardwareVersion(Math.min(host1Version, host2Version));
22832283
}
22842284
}
22852285
return hardwareVersion;

0 commit comments

Comments
 (0)