shwstppr commented on code in PR #10369: URL: https://github.com/apache/cloudstack/pull/10369#discussion_r1954449798
########## server/src/main/java/com/cloud/server/ManagementServerImpl.java: ########## @@ -1612,6 +1613,12 @@ public Ternary<Pair<List<? extends Host>, Integer>, List<? extends Host>, Map<Ho logger.debug("Hosts having capacity and suitable for migration: {}", suitableHosts); } + // Only list hosts of the same architecture as the source Host in a multi-arch zone + List<CPU.CPUArch> clusterArchs = ApiDBUtils.listZoneClustersArchs(vm.getDataCenterId()); + if (CollectionUtils.isNotEmpty(clusterArchs) && clusterArchs.size() > 1) { + suitableHosts = suitableHosts.stream().filter(h -> h.getArch() == srcHost.getArch()).collect(Collectors.toList()); + } Review Comment: can we do all this only if there are any suitable hosts found? -- 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