Skip to content

Commit 785172b

Browse files
msg update with vm/host name
1 parent 6aa828b commit 785172b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,13 @@ public DeployDestination planDeployment(VirtualMachineProfile vmProfile, Deploym
388388
HostVO host = _hostDao.findById(vm.getLastHostId());
389389
if (host == null) {
390390
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
391-
throw new CloudRuntimeException("Failed to deploy VM, last host doesn't exist");
391+
throw new CloudRuntimeException(String.format("Failed to deploy VM %s, last host doesn't exist", vm.getName()));
392392
}
393393
} else {
394394
logger.debug("VM's last host is {}, trying to choose the same host if it is not in maintenance state", host);
395395
if (host.isInMaintenanceStates()) {
396396
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
397-
throw new CloudRuntimeException("Failed to deploy VM, last host is in maintenance state");
397+
throw new CloudRuntimeException(String.format("Failed to deploy VM %s, last host %s is in maintenance state", vm.getName(), host.getName()));
398398
}
399399
} else {
400400
lastHost = host;

0 commit comments

Comments
 (0)