Skip to content

Conversation

@shwstppr
Copy link
Contributor

Description

Fixes #11941

User can use the same password as the original VM at the time of backup. Or else the reset password option can be used. Behaviour can be documented.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 17.64%. Comparing base (bfc4f60) to head (5129b00).
⚠️ Report is 30 commits behind head on 4.22.

Files with missing lines Patch % Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #11948      +/-   ##
============================================
+ Coverage     17.56%   17.64%   +0.08%     
- Complexity    15540    15673     +133     
============================================
  Files          5909     5909              
  Lines        529045   534130    +5085     
  Branches      64615    67020    +2405     
============================================
+ Hits          92933    94264    +1331     
- Misses       425657   429276    +3619     
- Partials      10455    10590     +135     
Flag Coverage Δ
uitests 3.52% <ø> (-0.06%) ⬇️
unittests 18.72% <83.33%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Abhishek Kumar <[email protected]>
@abh1sar
Copy link
Collaborator

abh1sar commented Oct 31, 2025

@shwstppr Does it show the password on vm creation from backup like it does for normal vm creation?

@shwstppr
Copy link
Contributor Author

@abh1sar no. I don't think that will be possible. We don't store the password with the backup (even with VM entry in the DB).
Also, depending on when backup is taken, password can be different.
I think it would be better to document or somehow try to show a dialog after deployment that the password should be reset.

@shwstppr shwstppr changed the base branch from main to 4.22 November 13, 2025 04:41
@shwstppr shwstppr closed this Nov 13, 2025
@shwstppr shwstppr reopened this Nov 13, 2025
@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@abh1sar abh1sar self-assigned this Nov 13, 2025
@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 15737

@abh1sar
Copy link
Collaborator

abh1sar commented Nov 13, 2025

Hi @shwstppr
In my testing, I found that the Password of the Instance created from backup is not equal to the original VM password at the time of backup.
It is set to a random password as seen below in the VR. I had set the password on the original VM as password

root@r-8-VM:~# cat /etc/cloudstack/vmpassword.json 
{
  "10.1.3.228": "hqbD79",
  "id": "vmpassword"
}root@r-8-VM:~# 

@shwstppr
Copy link
Contributor Author

Thanks for checking @abh1sar.
I'll check and update the PR. Though it doesn't sound intuitive to me that a backup restored VM has a different password. But we can always show that to the user so it should work.

@abh1sar abh1sar removed their assignment Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Instance from Backup taken from a password enabled template not working

3 participants