Skip to content

Commit 19fb237

Browse files
authored
server: password is not displayed when reinstall a vm or reset… (#3948)
1 parent 7d0fd9f commit 19fb237

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
822822
if (!result) {
823823
throw new CloudRuntimeException("Failed to reset SSH Key for the virtual machine ");
824824
}
825+
userVm.setPassword(password);
825826
return userVm;
826827
}
827828

@@ -6503,6 +6504,7 @@ public UserVm restoreVMInternal(Account caller, UserVmVO vm, Long newTemplateId)
65036504
if (!result) {
65046505
throw new CloudRuntimeException("VM reset is completed but failed to reset password for the virtual machine ");
65056506
}
6507+
vm.setPassword(password);
65066508
}
65076509

65086510
if (needRestart) {

0 commit comments

Comments
 (0)