Migrate a batch of instances (ESXi)

This is an example guide for migrating instances from VMware ESXi to Incus.

Overview of the available VMs and networks in the ESXi deployment: ESXi VMs

ESXi Networks

Register a source

The first step is to add the source. For this example, the source will be an ESXi deployment at https://10.10.0.3

Enter your ESXI credentials and verify the displayed certificate fingerprint. Add a source

Connectivity status should display as OK to indicate the source has been successfully registered: List sources

After this, instances and their networks will be imported from the source:

List instances List networks

Note

For the best possible experience, ensure VMs have background import (change tracking) enabled. See Enable change tracking for details.

Without change tracking, migrations cannot occur with running VMs, prolonging downtime.

The default Target Network for /ha-datacenter/network/VMWARE is determined to be VMWARE. Ensure a network by this name exists on the Incus target.

Register a target

The next step is to add a target, this follows a similar pattern to sources. Here we add an Incus cluster located at https://10.1.0.101:8443

Add a target List targets

Tip

Incus targets also support OIDC authentication if set up.

Creating a batch

Refer to Batches for more details about batch configuration.

Now we can create a batch of instances to be migrated, and set up the migration plan. In this case, we will assume target incus01 has a storage pool named default, and a project named default with a network named incusbr0.

Add a batch List batch instances

Here we have set up an include_expression filter that matches 2 instances from a source: the location path contains either Win2016 or CentOS, and all matches must have exactly one disk. Most fields are left with their defaults, and we have added a single migration window that lasts 10 minutes. While waiting for the migration window to begin, background sync will top-up every 1 hour, and perform one final top-up 10 minutes before the migration window starts.

Once the batch is explicitly started, the target instances will be created on the target, and begin pulling data from the still-running source VMs. The source VMs will not be stopped until the migration window starts, and if the migration does not complete before the window ends, then the migration will fail for that VM and it will be turned back on.

Adding required artifacts

Some external files are required for migrations to proceed. See artifacts

Migrating a batch

With all of the above in place, we can now start the batch and observe the queue:

List queue

After background import is complete, the migration will halt temporarily until the migration window starts. Periodically, data will be topped up without shutting off the source VM.

Waiting queue

Finally, the migration has completed! The source VM will have powered off, and the target instance should now be running:

Finished queue