backup: veeam kvm integration#12991
Conversation
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
todo: patch (needed?)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
| return true; | ||
| } | ||
|
|
||
| resetService(unitName); |
There was a problem hiding this comment.
If the service is running (checkResult == null) but the control socket is not ready, the code falls through, calls resetService, and then skips the start block because checkResult != null is false. It then waits up to 10 seconds for a socket that will never become ready because nothing restarted the service. The service is left in a broken state.
There was a problem hiding this comment.
Thanks for your comment @jochemkalsbeek287
If the service is running but the control socket is not ready, it means that it is an intermittent state - the service was just started, so the control socket is not ready yet.
It's bound to get ready after the 10 second wait.
If there is an error in the image server code which causes the control socket to not open, that will cause it to fail. Image server will be restarted in the next attempt.
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17647 |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
[SF] Trillian test result (tid-15987)
|
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17665 |
| # Enable TLS for image server transfers. The keys are read from: | ||
| # cert file = /etc/cloudstack/agent/cloud.crt | ||
| # key file = /etc/cloudstack/agent/cloud.key | ||
| image.server.tls.enabled=true |
There was a problem hiding this comment.
@shwstppr
is /etc/cloudstack/agent/cloud.ca.crt used ?
There was a problem hiding this comment.
@abh1sar can tell better but I think yes we use cloud certificates for image server.
To the Veeam worker VM, we just pass the Root CA from the MS
There was a problem hiding this comment.
that's right. Is it ok to show the file names?
There was a problem hiding this comment.
got it, the control service and image service use the same Root CA (these key/cert are generated from it too), right ?
There was a problem hiding this comment.
No, control service uses the certificate configured for the management server by the operator.
Image service uses the internal CA.
control service CA can be different for example in case when multiple management servers are behind LB and that LB has its own SSL config.
| import com.cloud.utils.EnumUtils; | ||
|
|
||
| @APICommand(name = "createImageTransfer", | ||
| description = "Create image transfer for a disk in backup. This API is intended for testing only and is disabled by default.", |
There was a problem hiding this comment.
This API is intended for testing only and is disabled by default.
this sentence exists in all APIs in this folder. is this correct ? @abh1sar
There was a problem hiding this comment.
yes Wei, I don't want to expose these APIs to end users. Only Veeam control service uses them.
But they are useful in testing. For example, we can run integration tests using these even without veeam.
Any better way to handle this?
There was a problem hiding this comment.
maybe add a global setting and expose them only when the setting is set to true ?
There was a problem hiding this comment.
yes, the global setting is already there expose.kvm.backup.export.service.apis
| @@ -10075,4 +10113,33 @@ private void setVncPasswordForKvmIfAvailable(Map<String, String> customParameter | |||
| vm.setVncPassword(customParameters.get(VmDetailConstants.KVM_VNC_PASSWORD)); | |||
| } | |||
| } | |||
|
|
|||
| protected boolean isBlankInstanceDefaultTemplate(VirtualMachineTemplate template) { | |||
| return KVM_VM_DUMMY_TEMPLATE_NAME.equals(template.getUniqueName()); | |||
There was a problem hiding this comment.
maybe rename to KVM_BLANK_VM_TEMPLATE_NAME or so
| 'listVmCheckpoints' : 'Backup and Recovery', | ||
| 'deleteVmCheckpoint' : 'Backup and Recovery', | ||
| 'ImageTransfer' : 'Backup and Recovery', | ||
| 'VmCheckpoint' : 'Backup and Recovery', | ||
| 'UnmanagedInstance': 'Virtual Machine', |
There was a problem hiding this comment.
maybe only the last two are needed
'ImageTransfer' : 'Backup and Recovery',
'VmCheckpoint' : 'Backup and Recovery',
| @@ -87,6 +87,7 @@ export default { | |||
| } | |||
| }, | |||
| created () { | |||
| console.log('---------------', this.$route.meta.name) | |||
Description
Design spec: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=421954133
This PR introduces the initial implementation of Veeam integration support for KVM in CloudStack by adding a UHAPI-compatible server and image server components.
Veeam Backup & Replication interacts with virtualization platforms using its Universal Hypervisor API (UHAPI). To enable backup and restore workflows for CloudStack-managed KVM environments, this change introduces a UHAPI server that exposes CloudStack resources through a UHAPI-compatible interface.
In addition to the control plane APIs, an image server component is introduced to handle the data transfer operations required during backup and restore workflows.
Architecture
The integration consists of two main components:
A lightweight UHAPI server runs inside the CloudStack management server and exposes endpoints under:
This server provides inventory discovery APIs required by Veeam and translates CloudStack resources into the structures expected by UHAPI.
The server:
A separate image server component is introduced to handle backup and restore data transfer operations.
This component:
The separation between both these components server ensures that:
Documentation PR: apache/cloudstack-documentation#642
Co-authored by @abh1sar @weizhouapache
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?