GitHub user Ezio1001 created a discussion: RHEV to ACS Migration
Hi Everyone, I’ve developed a scalable approach for migrating VMs that has significantly simplified the process. ## Prerequisites 1. Configure an **NFS Export Storage Domain** in the RHEV environment. 2. Create a dedicated **ACS Primary Storage Pool** for migration purposes only, to isolate imported disks and avoid operational confusion. 3. Prepare a **jump host** with both storage exports mounted. ## Pre-Migration Checks Before migrating a VM, verify the following: 1. Power off the source VM before export. 2. Remove any active snapshots. 3. Verify sufficient free space exists in: * The RHEV Export Storage Domain * The ACS migration Primary Storage Pool 4. Validate guest boot mode compatibility (BIOS or UEFI) between source and destination. 5. Verify disk/controller driver compatibility (for example VirtIO drivers where applicable). 6. Record the source VM specifications for validation after migration: * vCPU * Memory * Disk layout * MAC/IP configuration if needed 7. (Optional) Generate checksums for source disks if integrity verification is required. ## Migration Workflow 1. Mount both NFS exports on the jump host (for example): ```bash /mnt/rhv-export /mnt/acs-mig ``` 2. Export the target VM from RHEV to the Export Storage Domain. 3. On the jump host, navigate to the mounted RHEV Export Storage Domain and locate the VM disk under: ```bash /mnt/rhv-export/<EXPORT_DOMAIN_ID>/images/<DISK_ID>/ ``` 4. Identify the disk image files. You will typically find: * The qcow2 disk image (no extension) * A `.meta` file Copy **only the qcow2 disk image** and ignore the `.meta` file. 5. Copy the disk image to the root of the ACS migration Primary Storage mount: ```bash cp /mnt/rhv-export/<EXPORT_DOMAIN_ID>/images/<DISK_ID>/<DISK_FILE> /mnt/acs-mig/ ``` (Use `rsync`, or another preferred copy method if desired.) 6. In ACS navigate to: **Tools → Import Data Volumes** Select the migration Primary Storage Pool. The copied disk should appear under **Unmanaged Volumes**. 7. Import the volume. 8. Attach the imported volume to a placeholder instance created without a root disk, assigning it **device ID 0**, so it becomes the root disk. ## Post-Migration Validation After import, validate: 1. VM boots successfully. 2. Root disk is recognized and attached correctly. 3. Networking is functional. 4. Guest OS and application services start normally. 5. Disk partitions and filesystem integrity are intact. 6. Performance and connectivity are as expected. ## Automation I also developed a Bash script that automates this workflow by: * Calling the RHEV API to export the VM * Mounting the required storage exports * Locating disks by ID * Copying the disk image * Calling ACS APIs to import the volume * Creating a temporary VM * Detaching its default root disk * Attaching the migrated volume as the root disk We have tested this extensively and successfully migrated **100+ VMs** so far, with significant time savings. ## Current Limitation At the moment, the script supports **single-disk VMs only**. Support for multi-disk VMs is still in progress, although those can be migrated manually using the workflow above. ## Further Enhancement I later integrated this into our GitLab environment, and the process is now fully automated through a pipeline. The administrator only provides three inputs: * Target VM name * Source RHEV VM ID * Destination ACS Network ID The pipeline handles the rest. GitHub link: https://github.com/apache/cloudstack/discussions/13085 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
