diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmLogonCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmLogonCommand.java index 9026eddd1ad..8f7f9e8fe22 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmLogonCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmLogonCommand.java @@ -49,15 +49,19 @@ protected void perform() { final DbUser currentUser = getCurrentUser(); final String password = SsoUtils.getPassword( sessionDataContainer.getSsoAccessToken(getParameters().getSessionId())); - final String domainController = currentUser != null ? currentUser.getDomain() : ""; - final boolean sentToVM = runVdsCommand( - VDSCommandType.VmLogon, - new VmLogonVDSCommandParameters( - getVdsId(), - getVm().getId(), - domainController, - getUserName(), - password)).getSucceeded(); - setSucceeded(sentToVM); + if (password == null) { + setSucceeded(true); + } else { + final String domainController = currentUser != null ? currentUser.getDomain() : ""; + final boolean sentToVM = runVdsCommand( + VDSCommandType.VmLogon, + new VmLogonVDSCommandParameters( + getVdsId(), + getVm().getId(), + domainController, + getUserName(), + password)).getSucceeded(); + setSucceeded(sentToVM); + } } }