-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new Instance from VM backup #10140
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10140 +/- ##
============================================
+ Coverage 16.26% 16.38% +0.12%
- Complexity 13387 13518 +131
============================================
Files 5674 5683 +9
Lines 498927 500912 +1985
Branches 60337 60687 +350
============================================
+ Hits 81155 82093 +938
- Misses 408732 409627 +895
- Partials 9040 9192 +152
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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. |
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 |
@@ -0,0 +1,150 @@ | |||
package org.apache.cloudstack.backup.dao; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license
Assert.assertEquals("test-offering", response.getBackupOffering()); | ||
Assert.assertEquals("MANUAL", response.getIntervalType()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eol before eof
if (vm.getBackupOfferingId() != null) { | ||
List<Backup> backupsForVm = backupDao.listByVmId(vm.getDataCenterId(), vm.getId()); | ||
if (CollectionUtils.isEmpty(backupsForVm)) { | ||
backupManager.removeVMFromBackupOffering(vm.getId(), true); | ||
} else { | ||
throw new CloudRuntimeException(String.format("This VM [uuid: %s, name: %s] has a " | ||
+ "Backup Offering [id: %s, external id: %s] with %s backups. Please, remove the backup offering " | ||
+ "before proceeding to VM exclusion!", vm.getUuid(), vm.getInstanceName(), vm.getBackupOfferingId(), | ||
vm.getBackupExternalId(), backupsForVm.size())); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract method?
@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 |
Doc PR: apache/cloudstack-documentation#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
UI
DB changes
Other Changes
Map datadisksdetails
to deployVirtualMachine api to create multiple data volumes at the time of instance creation.Plugins related changes
Other Miscellaneous changes
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)
Object Storage (allocated and available) is shown on the Capacity dashboard and tracked for alerts.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?