msg update with vm/host name

This commit is contained in:
Suresh Kumar Anaparti 2025-11-14 12:09:27 +05:30
parent 214d58d677
commit cb05995f6d
No known key found for this signature in database
GPG Key ID: D7CEAE3A9E71D0AA
1 changed files with 2 additions and 2 deletions

View File

@ -388,13 +388,13 @@ StateListener<State, VirtualMachine.Event, VirtualMachine>, Configurable {
HostVO host = _hostDao.findById(vm.getLastHostId());
if (host == null) {
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
throw new CloudRuntimeException("Failed to deploy VM, last host doesn't exist");
throw new CloudRuntimeException(String.format("Failed to deploy VM %s, last host doesn't exist", vm.getName()));
}
} else {
logger.debug("VM's last host is {}, trying to choose the same host if it is not in maintenance state", host);
if (host.isInMaintenanceStates()) {
if (Boolean.TRUE.toString().equalsIgnoreCase(considerLastHostStr)) {
throw new CloudRuntimeException("Failed to deploy VM, last host is in maintenance state");
throw new CloudRuntimeException(String.format("Failed to deploy VM %s, last host %s is in maintenance state", vm.getName(), host.getName()));
}
} else {
lastHost = host;