Migrating (CMaaS) from vSphere/ESXi
Migrations from VMware vSphere or VMware ESXi operate in the same way Replicas do and thus entail the same requirements and steps described below.
Replicating (DRaaS) from vSphere/ESXi
Requirements:
In the process of replicating from VMWare vSphere/ESXi, Coriolis will use Changed Block Tracking (CBT) to live-snapshot the disks of the VM and fetch their contents. Thus, the following requirements must be met:
- the vSphere must have CBT available to the user whose credentials were given to Coriolis
- the vSphere user whose credentials are given to Coriolis must have both read-only access and snapshot creation/deletion rights on the VM(s) wished to be moved
- the vSphere user whose credentials are given to Coriolis must have read-only access to the properties of infrastructure connected to the VM(s) (ex: datastore names/IOPS, DvS VLAN IDs, etc..)
- the VM to be replicated has all storage elements hosted on CBT-compatible data stores (either VFS or NFS)
- the VM to be replicated must have CBT enabled on all its disks. You may read up on how to enable CBT for a VM from VMWare’s official knowledge base
- this is represented by the ctkEnabled flag, which must be set to True for each source VM disk.
- Coriolis can optionally be configured to enable CBT on the VM automatically, granted the source VM has no pre-existing snapshots
- the VM to be replicated must have the VMWare guest agent installed and running for filesystem quiescing during the live snapshotting process
Input: the slash-separated VM inventory path starting with datacenter (ex: “DC1/somevmfolder/The VM”). If the VM is at the top level, datacenter may be omitted (ex: “DC1/The VM” can be “The VM”)
Consider reviewing the general steps recommended before creating and executing a replica for an instance from vSphere.
IMPORTANT! The Coriolis virtual appliance must be able to resolve the FQDNs of the ESXi hosts if such are enrolled under vSphere. If DNS resolution cannot be used, you can use the Coriolis console interface to statically define the FQDN entries on the Coriolis’ hosts file.
Refer to the Network Ports Requirements page for more details.
Steps performed by Coriolis:
- read the instance configuration on the source vSphere (hardware information, disks, etc…)
- if configured to enable CBT itself, Coriolis will create and remove a temporary snapshot for the CBT data to be refreshed
- Create crash-consistent CBT snapshots of all of the instances’ volumes. If this is not the first replica execution, incremental snapshots are performed
- fetch backup data from the CBT snapshots via the CBT API
After the above steps are completed, the written blocks of the CBT snapshot will be transferred and written to disks on the destination via the destination cloud plugin
NOTE: During a Replica/Migration process from VMWare, if the option to keep the static IP address for the machine is selected, VMWare tools must be available, and the machine must be powered on during the last replica incremental sync.
IMPORTANT! If 3rd party backup software relies on (or blocks/locks) VSS on Windows VMs, consider pausing such tools for the duration of the migration process. This includes backup solutions that have a Windows agent.
VMWare source environment parameters
The source environment parameters are a set of source-cloud-specific parameters that offer some extra options to the migration/replication process on a per-VM basis.
Below is a listing of the source environment parameters the VMWare plugin supports when migrating/replicating a VM from vSphere/ESXi:
Example of source environment JSON to be passed to VMWare plugin
1 2 3 4 |
{ "vixdisklib_compatibility_version": "6.7", "automatically_enable_cbt": false } |
- vixdisklib_compatibility_version (string) – The vSphere version for which to initialize vixDiskLib.
- automatically_enable_cbt (boolean) – Whether or not Coriolis should attempt to automatically enable CBT on the VM before Replication.
OSMorphing steps taken when migrating/replicating from vSphere/ESXi
The following notable steps will be performed as part of the OSMorphing process when migrating/replicating an instance away from VMWare:
Linux:
- uninstall the VMWare guest tools
- rebuild initrd on RHEL-based systems
For more information regarding the Coriolis Worker template, please check the Coriolis Temporary Migration Worker page.
Required permissions in vCenter
For role isolation purposes, we highly recommend creating a new service role in vCenter. This role will then be assigned to a new service user that will be used in Coriolis.
When having VMware as a source platform, the role of the user account given to Coriolis must have the following privileges:
Object | Required Privilege** | Required on | Requirement | Motivation/observation |
Datacenter | Read-only* | The Datacenter object(s) to be migrated from | required | Listing the VM inventory of the DC |
Datastore | Read-only* Datastore > Browse Datastore | The Datastores which host the VM’s disks | optional | Identifying which disk came from which datastore. Storage backend mapping features will not be available without it |
Network | Read-only* | The Networks connected to the VM’s NICs | required | Identifying which interface came from which network |
Distributed switch | Read-only* | The DVSes connected to the VM’s NICs | required | Identifying DvS Port Groups and associated information |
dvPort group | Read-only* | The DVPGs connected to the VM’s NICs | required | Identifying DvS Port Groups information |
Virtual Machine | Virtual Machine > Toggle Disk Change Tracking | The VM(s) which are to be migrated | optional | Required for automatically enabling Changed Block Tracking (CBT). Can be skipped if CBT is already enabled |
Virtual Machine | Virtual Machine > Allow virtual machine download | The VM(s) which are to be migrated | required | Required for exporting the data of the VMs’ disk(s) |
VM Power State | Virtual Machine > Power Off | The VM(s) which are to be migrated | optional | Required for automatically powering source VMs off before Migrations. |
Snapshot | Virtual Machine > Create/Remove Snapshot | The VM(s) which are to be migrated | required | Required for the creation and cleanup of temporary VM snapshots |
Disk | Virtual Machine > Allow read-only disk access | The disks of the VM(s) which are to be migrated | required | Required for exporting the data of the VMs’ disk(s) |
- * for most resource types, “Read Only” access is implicitly obtained by simply assigning any role to the user on the object in question. (regardless of the privileges declared within the role)
- ** The privilege labels and PyVMOMI privilege IDs are for VMWare 6.7. Older VMWare releases may have slightly different permission name labels.
Configuration Options
Below is a listing of the configuration section needed when migrating from VMWare vSphere/ESXi:
Configuration options for VMWare vSphere/ESXi as a DRaaS source
1 2 3 4 5 6 7 8 9 10 11 12 |
[vmware_vsphere_migration_provider] # The path where the SOs for vixDiskLib are located: vixdisklib_library_directory = /opt/coriolis/vmware-vix-disklib # Required in order to set the compatibility of the vixDiskLib release # Coriolis will use during replication/CBT-based migration from VMWare. vixdisklib_compatibility_version = 8.0 # Whether or not Coriolis should attempt to automatically enable CBT # on the VM before Replication. # This requires that the VM have no pre-existing snapshots. automatically_enable_cbt = false |