server: password is not displayed when reinstall a vm or reset… (#3948)

This commit is contained in:
Wei Zhou 2020-03-12 11:14:34 +01:00 committed by GitHub
parent 7d0fd9fa3f
commit 19fb23781b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -822,6 +822,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
if (!result) {
throw new CloudRuntimeException("Failed to reset SSH Key for the virtual machine ");
}
userVm.setPassword(password);
return userVm;
}
@ -6503,6 +6504,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
if (!result) {
throw new CloudRuntimeException("VM reset is completed but failed to reset password for the virtual machine ");
}
vm.setPassword(password);
}
if (needRestart) {