andrijapanicsb opened a new pull request, #13656:
URL: https://github.com/apache/cloudstack/pull/13656
### Description
This PR makes **Ceph/RBD a first-class source and target for KVM VM
onboarding** and adds an **operator-driven warm VMware→KVM migration** path. It
bundles four related commits:
#### 1. VMware CBT → native RBD/qcow2 **warm** migration to KVM
An operator-driven, **warm** VMware-to-KVM migration built on **VDDK** and
**VMware Changed Block Tracking (CBT)**. It maintains a source-equivalent
KVM-side replica kept current through repeated **delta/sync cycles**, then
finalizes the guest with **virt-v2v in-place** at **cutover** — bounding
downtime to the cutover window instead of a full cold copy.
- Targets **both** filesystem (`qcow2`) and **native Ceph/RBD** (raw image)
primary storage.
- Full lifecycle as **async** operations with **persisted migration state**
(migration / cycle / disk records), **preflight validation**, cancel/cleanup,
and **Import/Export UI** integration.
- New admin API commands: `startVmwareCbtMigration`,
`syncVmwareCbtMigration`, `cutoverVmwareCbtMigration`,
`cancelVmwareCbtMigration`, `deleteVmwareCbtMigration`,
`listVmwareCbtMigrations`, `checkVmwareCbtMigrationPrerequisites`.
- Server orchestration in `VmwareCbtMigrationManagerImpl` (+
`VmwareCbtMigrationServiceImpl`, cutover policy), backed by new VOs/DAOs and a
DB schema migration.
- KVM agent: libvirt CBT command wrappers (prepare / sync / cutover /
RBD-probe) driving VDDK + qemu + virt-v2v, plus agent commands/answers and a
sync-plan.
- UI: new **VMware CBT Migrations** view and additions to Import/Manage
Instances under Tools.
- Docs: `docs/vmware-cbt/` (architecture + README) and
`docs/vmware-cbt-migration.md`.
#### 2. Direct **VDDK** VMware import into Ceph/RBD
Extends the existing VDDK + virt-v2v VMware→KVM **import** path so the
converted disk is written **straight into an RBD pool as a raw image**, with
**in-place virt-v2v finalization** (no intermediate qcow2-on-NFS staging copy).
Adds host-capability detection for qemu-img RBD support, RBD qemu-copy,
virt-v2v in-place, and direct-RBD import — advertised via `ReadyCommand` and
reconciled by the agent manager.
#### 3. `importVm` adoption of an existing RBD (Ceph) root volume
Extends the KVM unmanaged-import / manage-volume flow so an **existing raw
RBD image can be adopted directly as a VM ROOT volume**. Adds RBD-aware format
handling in `VolumeOrchestrator` (RBD ⇒ `RAW` instead of the hardcoded `QCOW2`)
and the RBD branch in the libvirt volume-inspection path
(`LibvirtCheckVolumeCommandWrapper`), so `CheckVolumeCommand` succeeds on RBD
instead of failing with "Disk not found or is invalid".
#### 4. Consolidate KVM host-capability probe names across the RBD features
Because features (1) and (2) introduced host-capability keys independently,
this commit **unifies them under feature-neutral names** that describe what is
probed, and drops a redundant alias (`host.rbd.qemu.copy.support`, identical to
`host.qemu.rbd.support`) and its delegate.
### Types of changes
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Bug fix
- [ ] Enhancement
### Feature/Enhancement Scale
- [x] Major
- [ ] Minor
### How Has This Been Tested?
- Unit tests for all new and touched wrappers/managers/orchestration:
`LibvirtImportConvertedInstanceCommandWrapperTest`,
`LibvirtConvertInstanceCommandWrapperTest`,
`LibvirtCheckConvertInstanceCommandWrapperTest`,
`LibvirtCheckVolumeCommandWrapperTest`,
the `LibvirtVmwareCbt*` suites, `UnmanagedVMsManagerImplTest`,
`VolumeImportUnmanageManagerImplTest`, the server-side `VmwareCbt*` suites,
and `VolumeOrchestratorTest` — all passing.
- Manual/lab validation of warm CBT migration and direct-RBD import against
a Ceph/RBD KVM cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]