Understanding VM Replication

The replication plugin in Oracle Cloud Migrations manages the replication of source assets snapshots from the source environment to Oracle Cloud Infrastructure.

The replication plugin takes snapshots from volumes of source VM and copies them into the replication bucket.

About Replication Bucket

The replication bucket is an intermediary storage location that stores source assets snapshots (boot and block volumes).

Create a private bucket in a replication compartment, which you specify during migration for replication location. You can choose to specify a user-specified bucket name instead of system-generated bucket names. User-specified bucket names can have letters (upper or lower case), numbers, hyphens, underscores, and periods. For more information about managing buckets for snapshot operations, see Managing Buckets in Object Storage.

For example:

Create a bucket for a compartment in a target region that you're migrating to.

Use the following policies relevant to the bucket,

Allow dynamic-group HydrationAgentDynamicGroup to read objects in compartment <migration_compartment_name>
Allow dynamic-group HydrationAgentDynamicGroup to {OCM_HYDRATION_AGENT_TASK_INSPECT, OCM_HYDRATION_AGENT_TASK_UPDATE, OCM_HYDRATION_AGENT_REPORT_STATUS} in compartment <migration_compartment_name>

For more information about Oracle Cloud Migrations policies, see Oracle Cloud Migrations Service Policies.

About Hydration Agent

The hydration agent is a Compute instance that starts at the replication location, which you specify during creating migration project.

The hydration agent aims at block copying the snapshots of assets taken by the replication plugin into the generated block volumes at Oracle Cloud Infrastructure. The hydration agent instances start automatically to load balance the replication process based on the object pool logic. The hydration agent instances are created based on algorithms for the approved shapes and images. Each hydration agent instance creates one VCN, one subnet, and associated resources (VCN route table). To know about the maximum number set for the VCN, subnet, and associated resources, see Networking Limits in Service Limits. You can submit a request to increase your service limits from within the Console. To increase the service limit, see Request a service limit increase.

The approved shapes algorithm chooses one of the shapes available in your availability domain and compartment. The algorithm prefers shapes with minimum CPU number and minimal cost. For more information about the VM shapes of standard series, see VM Shapes.

The algorithm for approved images starts the hydration agent instance with one of the approved images such as, Oracle-Linux-7.9 OS that is available. With the new image deployments, the algorithm gets updated.

Limits for Hydration Agent

Ensure that you reserve sufficient limits for the hydration agent instances. Only administrators can increase the hydration agent limits.

Ensure you have adequate limits in the target region for the VM.Standard.E4.Flex (standard-e4-core-count, standard-e4-memory-count) shape. We recommend that you reserve 10 CPU and 160 GB memory of the available capacity for the hydration agents. Also, ensure to consider the shape limit requirements for the VMs to be migrated.

If Standard.E4 shape isn't available, we recommend that you reserve appropriate resources for the approved shapes.

About Incremental Transfers

The incremental transfers require you to enable Changed Block Tracking (CBT) at the VM level.

The replication plugin automatically performs an incremental update when a common VM snapshot to work from, exists and you enable CBT for the VM. For enabling CBT, search for Changed Block Tracking (CBT) on virtual machines KB article, at VMware KB article.

Boot Volume Modifications for Migration

Migrating a virtual machine to Oracle Cloud Infrastructure (OCI) Compute requires some OS level (boot volume) modifications to ensure that the migrated instance boots up successfully on the OCI Compute hypervisor.

The Oracle Cloud Migrations service automatically applies the required configuration changes on the boot volume of Linux virtual machines. These changes include installation of virtio kernel modules when not present, storage attachment updates, and kernel parameters for serial console access.

A new boot volume for a VM is created in the same compartment where you launch the VM based on a custom image. The boot volume is associated with the VM until you terminate the VM instance.

Boot Volume Modification for Linux

In the following table, review the automatic boot volume configuration changes.

Oracle Cloud Migrations automatically applies the required configuration changes on VMs boot volume for all the supported operating systems. However, if you are using unsupported Linux operating systems, see the following table about how to manually apply the required configuration changes before you replicate the migration asset.

Note

For information about the supported Linux operating systems, see Supported Source VM Guest Operating Systems.
Configuration change Description Steps to manually apply a configuration
Enable serial console We recommend you to enable serial console for troubleshooting VM instances after migration by using Oracle Cloud Console. Apply the following configuration changes to the boot configuration:
  1. To /etc/securetty, add ttyS0 if the path exists.
  2. Modify the following options in the GRUB configuration of your Linux VM:
    • console=tty1
    • console=ttyS0,115200
  3. Remove the following options in the GRUB configuration for your Linux VM:
    • rhgb
    • quiet

For more information, see Enabling Serial Console

Install virtio drivers

Only paravirtualized mode for Linux-based operating systems is supported now.

Linux-based operating systems with kernel versions 3.4 or later support paravirtualized drivers.

Ensure that virtio kernel drivers are present in the kernel. Apply the following configuration changes, as required:
  1. To verify whether virtio kernel drivers are included in the kernel, run the following command.

    lsinitrd | grep "/virtio_net

  2. To install the virtio kernel drivers when not present, run the following command.

    dracut -f -add qemu INITRAM_FS_FILE KERNEL_VERSION

Update /etc/fstab We recommend you to refer devices using UUID or Logical Volume Manager (LVM) name in /etc/fstab.

If you refer devices using the file name, these devices can't be accessed after migration and the instance fails to boot up.

Apply the following configuration changes:

Mark all mount points that references to a device file as, nofail.

To mark, edit the /etc/fstab file so that it appears as follows.

/dev/sdb1 /data01 ext4 defaults,nofail 0 0

We recommend you to perform the following tasks before migration. You can also perform these tasks after migration when you're able to access the instance using an SSH or the Oracle Cloud Console. To use the Oracle Cloud Console, you must have an Oracle Cloud Infrastructure (OCI) account (user, password, and tenancy).

Tasks Description
Remove udev rule Remove any udev rules based on MAC address.
Enable SSH access to a VM Ensure that you enable SSH and set the SSHD service to start automatically on reboot.

Ensure that you don't block the incoming SSH connection requests by firewalls.

Configure network Update network interfaces to receive IP addresses based on DHCP.

Ensure that you don't use any hard-coded MAC addresses, static IP addresses, and DNS settings on the VM.

Install Oracle Cloud Agent Install and enable Oracle Cloud Agent. See Managing Plugins with Oracle Cloud Agent.
Install OS Management

Install and enable OS Management. See Managing Plugins with Oracle Cloud Agent.

Remove other cloud agents We recommend you to disable or remove other cloud management agents.
Configure NTP service We recommend you to update the OCI NTP service configuration after migrating your VM instances to OCI. See Configuring the Oracle Cloud Infrastructure NTP Service for an Instance.

Boot Volume Modification for Windows

Use the information in the following table to perform the tasks manually after migration.

Note

For information about the supported Windows operating systems, see Supported Source VM Guest Operating Systems.
Tasks Description
Configure SAN policy as Online All

To configure SAN, refer to the storage area network (SAN) windows command in Microsoft documentation.

Enable Remote Desktop (RDP) connections To enable RDP, refer to the Remote Desktop clients in Microsoft documentation.

To allow RDP access for both private and public network location types by modifying the Windows firewall inbound port rule, see Creating an Inbound Port Rule in Microsoft documentation.

Configure network Update network interfaces to receive IP addresses based on DHCP.

Ensure that you don't use any hard-coded MAC addresses, static IP addresses, and DNS settings on the VM.

Install Oracle virtio kernel drivers To install the Oracle virtio drivers for Windows, see Importing Custom Windows Images.
Enable serial console To enable serial console for windows, see Use Special Administration console for Windows.
Remove VMware tools For more information about removing VMware tools, search for Uninstalling VMware Tools KB article, at VMware KB article.
Configure OCI NTP Service To configure the OCI NTP service configuration, see Configuring the Oracle Cloud Infrastructure NTP Service for an Instance.