Create new Instance from VM backup
Doc PR: https://github.com/apache/cloudstack-documentation/pull/474
Description
This PR adds the ability to create a new Instance from a VM backup for Dummy, NAS and Veeam backup Providers. This will still work if the original Instance used to create the backup was expunged.
New API
- createVmFromBackup extends baseDeployVIrtualMachine
- new arguments : backupId, preserveip
- User can just specify the backupId and a new instance will be created by getting the VM and volumes' configuration stored in backup_details table.
- User can also choose to configure the details themselves using the parameters present in deployVIrtualMachine cmd
- If the original instance from which the backup was taken is deleted, user can choose to reuse the same IP addresses if they are available using the
preserveipargument.
UI
- New action button in backups list view - 'Create Instance from Backup'
- User can choose to directly create the VM or configure VM parameters before creating it.
DB changes
- New backup_details table
- to store vm config data such as serviceOfferingUuid, networkUuids, ipAddresses
- to store volumes config data such as diskOfferingUuids, size, miniops and maxiops for custom disk offerings.
Other Changes
- Added new parameter
Map datadisksdetailsto deployVirtualMachine api to create multiple data volumes at the time of instance creation.
Plugins related changes
- NAS and Veeam plugin changes to restore backup to a new VM and miscellaneous fixes around handling backups of expunged Instances.
Other Miscellaneous changes
- Add Name and description column to backup
- Show Interval type in UI for backups
- Support cephFS for NAS backup provider
- Add Backup Storage Capacity Tracking and Alerts Infrastructure Backup Storage (used and available) is shown on the Capacity dashboard and tracks the alerts if supported by the plugin (Currently only NAS BnR plugin supports it)
- Add Object Storage Capacity Tracking and Alerts Infrastructure Object Storage (allocated and available) is shown on the Capacity dashboard and tracked for alerts.
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] 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 Report
:x: Patch coverage is 40.97744% with 1256 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 17.35%. Comparing base (70468a6) to head (226e82a).
:warning: Report is 9 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #10140 +/- ##
============================================
+ Coverage 17.17% 17.35% +0.17%
- Complexity 15010 15186 +176
============================================
Files 5869 5883 +14
Lines 521710 524302 +2592
Branches 63509 63962 +453
============================================
+ Hits 89614 90974 +1360
- Misses 422039 423051 +1012
- Partials 10057 10277 +220
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 3.63% <ø> (-0.13%) |
:arrow_down: |
| unittests | 18.38% <40.97%> (+0.22%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Yes, we need this !
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11996
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12039
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12063
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12095
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
one diskoffering - zone link edge case seems to be remaining for testing/changes Please see if we need to add some documentation for the feature
thanks @shwstppr I have fixed the disk-offering edge case and catch all exceptions plus some minor UI fixes. Also linked doc PR.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12734
@blueorangutan package
@abh1sar 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.
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 12737
@blueorangutan package
@abh1sar 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.