Skip to content

Commit e76addb

Browse files
Update engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Co-authored-by: dahn <[email protected]>
1 parent b660e9b commit e76addb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,11 @@ public void start(final String vmUuid, final Map<VirtualMachineProfile.Param, Ob
935935
throw new CloudRuntimeException(String.format("Unable to start a VM [%s] due to [%s].", vmUuid, e.getMessage()), e).add(VirtualMachine.class, vmUuid);
936936
} catch (final ResourceUnavailableException e) {
937937
if (e.getScope() != null && e.getScope().equals(VirtualRouter.class)){
938-
throw new CloudRuntimeException("The Guest Network is unavailable. Please contact administrator: " + e.getMessage()).add(VirtualMachine.class, vmUuid);
938+
if (callingUser.isRootAdmin()) {
939+
throw new CloudRuntimeException("The Guest Network is unavailable: " + e.getMessage()).add(VirtualMachine.class, vmUuid);
940+
} else {
941+
throw new CloudRuntimeException("The Guest Network is unavailable. Please contact administrator. ").add(VirtualMachine.class, vmUuid);
942+
}
939943
}
940944
throw new CloudRuntimeException(String.format("Unable to start a VM [%s] due to [%s].", vmUuid, e.getMessage()), e).add(VirtualMachine.class, vmUuid);
941945
}

0 commit comments

Comments
 (0)