This is an automated email from the ASF dual-hosted git repository.
bstoyanov pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 0f770194df7 Configure config drive ISO with password file on
reinstallation of VM with password-enabled template (#9113)
0f770194df7 is described below
commit 0f770194df7962c5fbd66c06d57a120e7f591e04
Author: Pearl Dsilva <[email protected]>
AuthorDate: Wed Jun 12 05:00:08 2024 -0400
Configure config drive ISO with password file on reinstallation of VM with
password-enabled template (#9113)
* Configure config drive ISO with password file on reinstallation of VM
with password-enabled template
* address comment
---
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
index d9484761998..4d966d8e745 100644
--- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
@@ -7957,7 +7957,7 @@ public class UserVmManagerImpl extends ManagerBase
implements UserVmManager, Vir
}
if (needRestart) {
try {
- if (vm.getDetail(VmDetailConstants.PASSWORD) != null) {
+ if (Objects.nonNull(password)) {
params = new HashMap<>();
params.put(VirtualMachineProfile.Param.VmPassword,
password);
}