Deploying migrations
Deployment creates virtual machines on the target platform from the replicated data. During deployment, the system prepares the guest OS and starts the VMs.
If no replication has been performed, deployment cannot be started. You can run additional replications before deployment to reduce downtime when switching to the target environment.
You can deploy a migration automatically after replication or start deployment manually on the Deployments tab.
Prerequisites
- Replication must be completed before deployment. It can run automatically after migration creation, as described in Creating migrations, or be started manually, as described in Replicating migrations.
To deploy a migration
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Deployments tab, click Create deployment.
-
In the Create deployment window, specify the VM name and configure the deployment options:
- Enable Clone disks to reuse existing disks for incremental synchronization. If disabled, disks are fully re-synchronized.
-
Enable OS morphing to prepare the guest OS for the target platform by installing required drivers and removing source-specific components.
This step can be skipped when migrating between platforms using the same hypervisor (for example, KVM to KVM).
- Enable Start target VMs after deployment to start target VMs when they are deployed.
-
Upload user scripts to run on the guest OS during deployment.
- Click Deploy.
After deployment starts, virtual machines are created on the target platform. You can monitor the deployment progress and status in the deployment details.
Command-line interface
Use the following command:
vinfra service compute maas migration deployment add --migration <migration> [--name <name>] [--clone-disks | --dont-clone-disks]
[--force-deployment | --no-force-deployment] [--os-morphing | --no-os-morphing]
[--save-snapshot | --dont-save-snapshot] [--start | --dont-start]
[--windows-user-script-file <windows_user_script_file>] [--linux-user-script-file <linux_user_script_file>]
--migration <migration>- Migration ID or name
--name <name>- Deployment name
--clone-disks- Clone disks instead of moving them during migration
--dont-clone-disks- Move disks instead of cloning them during migration
--force-deployment- Force deployment even if some checks fail
--no-force-deployment- Do not force deployment if some checks fail
--os-morphing- Perform OS morphing
--no-os-morphing- Do not perform OS morphing
--save-snapshot- Keep existing snapshots of the source instances
--dont-save-snapshot- Do not keep existing snapshots of the source instances
--start- Start the instances after deployment
--dont-start- Do not start the instances after deployment
--windows-user-script-file <windows_user_script_file>- Path to a user script file to run on Windows deployments
--linux-user-script-file <linux_user_script_file>- Path to a user script file to run on Linux deployments
For example, to deploy the migration ubuntu_24.04, run:
# vinfra service compute maas migration deployment add --migration ubuntu_24.04 --name ubuntu-vm --clone-disks --no-force-deployment --os-morphing --start
You can check your created migration deployment in the vinfra service compute maas migration deployment list output:
# vinfra service compute maas migration deployment list --migration ubuntu-22.04 +---------------+-------------------+-----------+-----------------+ | id | name | status | source_cloud_id | +---------------+-------------------+-----------+-----------------+ | 3523d275<...> | Ubuntu-22.04-UEFI | COMPLETED | 3008d5c9<...> | +---------------+-------------------+-----------+-----------------+
To cancel a deployment
Canceling a deployment takes effect immediately and cannot be reversed.
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Deployments tab, click the ellipsis icon next to the ongoing deployment, and then click Cancel.
- In the confirmation window, click Confirm.
Command-line interface
Use the following command:
vinfra service compute maas migration deployment cancel --migration <migration> <deployment>
--migration <migration>- Migration ID or name
<deployment>- Deployment ID or name
For example, to cancel the deployment with the ID 1a4d5553-4a9a-4fc6-9877-fa6ad115b47a, run:
# vinfra service compute maas migration deployment cancel --migration ubuntu-22.04 1a4d5553-4a9a-4fc6-9877-fa6ad115b47a
To recreate a deployment
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Deployments tab, click the ellipsis icon next to the required deployment, and then click Recreate.
The deployment will be recreated with the preconfigured options.
To delete a deployment
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Deployments tab, click the ellipsis icon next to the required deployment, and then click Delete.
- In the confirmation window, click Delete.
Command-line interface
Use the following command:
vinfra service compute maas migration deployment remove --migration <migration> <deployment>
--migration <migration>- Migration ID or name
<deployment>- Deployment ID or name
For example, to delete the deployment with the ID 1a4d5553-4a9a-4fc6-9877-fa6ad115b47a, run:
# vinfra service compute maas migration deployment remove --migration ubuntu-22.04 1a4d5553-4a9a-4fc6-9877-fa6ad115b47a