You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s_logger.debug(String.format("Trying to get VM with specs: [vmInternalName: %s, templateId: %s, guestOsId: %s, serviceOfferingId: %s].", vmInternalName,
s_logger.debug(String.format("Can't find an existing VM with internalName: [%s]. Creating a new VM with: [id: %s, name: %s, templateId: %s, guestOsId: %s, serviceOfferingId: %s].",
s_logger.debug(String.format("VM [%s] does not have a host id. Trying the last host.", ReflectionToStringBuilderUtils.reflectOnlySelectedFields(vm, "instanceName", "id", "uuid")));
291
+
host = hostDao.findById(vm.getLastHostId());
292
+
if (host != null) {
293
+
returnhost.getClusterId();
294
+
}
295
+
296
+
s_logger.debug(String.format("VM [%s] does not have a last host id.", ReflectionToStringBuilderUtils.reflectOnlySelectedFields(vm, "instanceName", "id", "uuid")));
297
+
returnnull;
298
+
}
299
+
283
300
@Override
284
301
/**
285
302
* The basic implementation assumes that the initial "host" defined to execute the command is the host that is in fact going to execute it.
Copy file name to clipboardExpand all lines: server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -533,7 +533,8 @@ public boolean importRestoredVM(long zoneId, long domainId, long accountId, long
533
533
try {
534
534
vm = guru.importVirtualMachineFromBackup(zoneId, domainId, accountId, userId, vmInternalName, backup);
535
535
} catch (finalExceptione) {
536
-
LOG.error("Failed to import VM from backup restoration", e);
536
+
LOG.error(String.format("Failed to import VM [vmInternalName: %s] from backup restoration [%s] with hypervisor [type: %s] due to: [%s].", vmInternalName,
0 commit comments