Editing and deleting migrations
You can update migration settings or remove migrations that are no longer needed. Deleting a migration removes the migration record and associated metadata, it does not remove already deployed virtual machines.
Prerequisites
- A migration is created, as described in Creating migrations.
To edit a migration
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Overview tab, click Edit in the Details section.
- Update the required settings and click Save.
Command-line interface
Use the following command:
vinfra service compute maas migration set [--automatically-enable-cbt | --dont-automatically-enable-cbt]
[--vixdisklib-compatibility-version <vixdisklib_version>] [--enable-dhcp | --disable-dhcp]
[--preserve-fixed-ips | --ignore-fixed-ips] [--flavor-name <flavor_name>]
[--disk-bus <disk_bus>] [--keypair-name <keypair_name>] [--os-distro <os_distro>]
[--machine-type <machine_type>] [--server-group <server_group>]
[--floating-ip-pool <floating_ip_pool>] [--enable-floating-ip | --disable-floating-ip]
[--preserve-floating-ip | --ignore-floating-ip] [--retain-user-credentials |
--ignore-user-credentials] [--delete-disks-on-vm-termination | --keep-disks-on-vm-termination]
[--network-mapping <source_network_name:target_network_name|target_network_id>] [--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>
--automatically-enable-cbt- Automatically enable CBT for the migrated instance
--dont-automatically-enable-cbt- Do not automatically enable CBT for the migrated instance
--vixdisklib-compatibility-version <vixdisklib_version>- VixDiskLib compatibility version
--enable-dhcp- Enable DHCP during OS morphing
--disable-dhcp- Disable DHCP during OS morphing
--preserve-fixed-ips- Preserve fixed IP addresses from the source environment
--ignore-fixed-ips- Do not preserve fixed IP addresses from the source environment
--flavor-name <flavor_name>- Flavor name to use in the target environment
--disk-bus <disk_bus>- Disk bus type
--keypair-name <keypair_name>- SSH key pair name to inject for VM access
--os-distro <os_distro>- OS distribution label
--machine-type <machine_type>- Specify the hardware class
--server-group <server_group>- Assign the VM a to server group
--floating-ip-pool <floating_ip_pool>- Specify the pool for floating IP address allocation
--enable-floating-ip- Enable allocation of floating IP addresses to the VM
--disable-floating-ip- Disable allocation of floating IP addresses to the VM
--preserve-floating-ip- Retain the original VM's floating IP address
--ignore-floating-ip- Do not retain the original VM's floating IP address
--retain-user-credentials- Keep existing OS credentials during migration
--ignore-user-credentials- Do not keep existing OS credentials during migration
--delete-disks-on-vm-termination- Automatically remove disks when the VM is deleted
--keep-disks-on-vm-termination- Keep disks when the VM is deleted
--network-mapping <source_network_name:target_network_name|target_network_id>- Network mapping between source and target environments. The target network can be specified by name or ID. Can be specified multiple times.
--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
<migration>- Migration ID or name
For example, to add the Linux script file linux_script.sh to the migration ubuntu_24.04, run:
# vinfra service compute maas migration set ubuntu_24.04 --linux-user-script-file linux_script.sh
To fetch a VM from a source cloud into a migration
Use the following command:
vinfra service compute maas cloud instance fetch <instance> --cloud <cloud> --migration <migration>
<instance>- Cloud instance ID or name
--cloud <cloud>- Cloud ID or name
--migration <migration>- Migration ID or name
For example, to fetch the source VM new_vm from the cloud mycloud into the migration ubuntu_24.04, run:
# vinfra service compute maas cloud instance fetch new_vm --cloud mycloud --migration ubuntu_24.04
To clean up disks
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Overview tab, click Clean up disks at the bottom.
- In the confirmation window, click Clean up.
Command-line interface
Use the following command:
vinfra service compute maas migration cleanup-disks <migration>
<migration>- Migration ID or name
For example, to run disk cleanup for the migration ubuntu_24.04, run:
# vinfra service compute maas migration cleanup-disks ubuntu_24.04
To delete a migration
Admin panel
- On the Compute > Migration > Migrations tab, click the name of the required migration.
- On the Overview tab, click Delete at the bottom.
- In the confirmation window, click Delete.
Command-line interface
Use the following command:
vinfra service compute maas migration remove <migration>
<migration>- Migration ID or name
For example, to delete the migration ubuntu_24.04, run:
# vinfra service compute maas migration remove ubuntu_24.04