Skip to content

Commit 1090d3f

Browse files
Update logs while listing host for migration of a UEFI enabled VM
1 parent 19b13ca commit 1090d3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/main/java/com/cloud/server/ManagementServerImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ protected Pair<Boolean, List<HostVO>> filterUefiHostsForMigration(List<HostVO> a
14101410
if (vmInstanceDetailVO != null &&
14111411
(ApiConstants.BootMode.LEGACY.toString().equalsIgnoreCase(vmInstanceDetailVO.getValue()) ||
14121412
ApiConstants.BootMode.SECURE.toString().equalsIgnoreCase(vmInstanceDetailVO.getValue()))) {
1413-
logger.info(" Live Migration of UEFI enabled VM : " + vm.getInstanceName() + " is not supported");
1413+
logger.debug("{} VM is UEFI enabled, Checking for other UEFI enabled hosts as it can be live migrated to UEFI enabled host only.", vm.getInstanceName());
14141414
if (CollectionUtils.isEmpty(filteredHosts)) {
14151415
filteredHosts = new ArrayList<>(allHosts);
14161416
}
@@ -1420,6 +1420,9 @@ protected Pair<Boolean, List<HostVO>> filterUefiHostsForMigration(List<HostVO> a
14201420
return new Pair<>(false, null);
14211421
}
14221422
filteredHosts.removeIf(host -> !uefiEnabledHosts.contains(host.getId()));
1423+
if (filteredHosts.isEmpty()) {
1424+
logger.warn("No UEFI enabled hosts are available for the live migration of VM {}", vm.getInstanceName());
1425+
}
14231426
return new Pair<>(!filteredHosts.isEmpty(), filteredHosts);
14241427
}
14251428
return new Pair<>(true, filteredHosts);

0 commit comments

Comments
 (0)