Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Migrate VMs from an on-premises VMware environment to Oracle Cloud Compute VMs using Oracle Cloud Migrations service
Introduction
The Oracle Cloud Migrations service provides an end-to-end, comprehensive, self-service experience to migrate virtual machines from on-premises environments to Oracle Cloud Infrastructure (OCI). Oracle Cloud Migrations enables you to perform the following tasks:
-
Automatically discover virtual machines
-
Perform analysis of migration candidates
-
Replicate the data to OCI Object Storage
-
Launch the VMs as OCI compute instances using the replicated data
The Oracle Cloud Migrations workflow is based on the phases listed below:
-
Discovery: In this phase an Oracle Cloud Bridge (OCB) virtual appliance, deployed in the on-premises environment performs discovery of VM assets in the source environment.
-
Inventory: The Discovery is followed by the Inventory phase, where information about the discovered Virtual Machines is extracted & stored. This includes OS, Hardware & Utilization information regarding the collected assets.
-
Assessment & Planning: Once the Inventory is available, we move to the Assessment & Planning phases to create the migration project and plan. The assets to be migrated are added to the plan in this phase.
-
Replication: Replication of the nominated assets is initiated in this step. The OCB appliance is responsible for the replication of the VMs to OCI Object Storage.
-
Execution & Migration: On successful completion of the VM replication, we migrate the assets to the target OCI environment and validate the migration assets.
-
Cut-over and Cleanup: Once the migrated assets have been verified, we mark the project as complete and proceed with deletion of the migration project plan.
Objective
This tutorial provides step-by-step guidelines for configuring the Oracle Cloud Migrations service, to enable customers to migrate their virtual machines from an on-premises VMware environment to Oracle Cloud Compute VMs.
This tutorial summarizes how to migrate the virtual machine from on-premises vSphere environment to the OCI compute instances. This step-by-step guide will help the customers who want to seamlessly migrate their VMware virtual machine workload from on-premises to OCI.
Prerequisites
-
Access to an active OCI tenancy, which will be the target environment.
-
A Compartment in the tenancy. This can be a new or existing compartment.
-
Appropriate policy and permissions in place to manage Oracle Cloud Migrations and required components in the selected compartment. Please find details about required IAM Polices at: IAM and Oracle Cloud Migrations Policies. and On-prem vCenter roles and permissions.
-
Supported vSphere environment (6.5, 6.7 and Above). Supported vSphere versions & Operating systems. Supported vSphere versions and Operating systems.
-
Provide agent dependency, which is a 3rd party package required by remote agent appliance for it’s function. Oracle Cloud Migrations replication function running on the remote agent appliance depends on the appropriate VMware Virtual Disk Development Kit (VDDK) agent to perform the snapshot operations on the VMware VM disk. This can be downloaded from theVMware portal. For more information and download links for vSphere VDDK, see vSphere VDDK.
-
Create a Private Object Storage bucket in the OCI tenancy, to store the source asset snapshots.
-
Create a vault to store the credentials used by the Oracle Cloud Migrations Service.
-
Object Storage Configuration: OCI Object Storage will be used to store the replicated VM data by Oracle Cloud Migrations service from on-premises environment.
-
Create a Private Storage object bucket in the OCI tenancy. Go to the navigation menu, Storage, Buckets, and then click Create bucket.
-
Provide the required information.
- Bucket name
- Default storage Tier: Standard
- Encryption method
- Create
-
Upload the previously downloaded VDDK to this bucket.
-
-
OCI Vault Configuration: OCI Vault will be used to store the vSphere credentials used by Oracle Cloud Migrations service to communicate with vSphere environment.
-
Go to Identity and Security, Vault, Create Vault.
-
Select the compartment, Vault name, and then click Create Vault.
-
Once the vault is created click on the newly created vault to create the Master Encryption Key.
-
Click on Master Encryption Keys, Create key, select the right compartment and provide the key name. Click Create key.
-
Next, we will create secret to create store the credentials. Click Secrets, and then click Create secrets.
-
Provide the following information for the secret:
- Compartment name
- Secret name
- Description
- Select the encryption key created in the previous step
- Secret type template as Plain-text
- Secret contents: Provide the VC user name and pass in this format. Example:
{"username":"VC Oracle Cloud Migrations user name","password":"password"}
.
-
Task 1: Set up the Oracle Cloud Migrations service in OCI
In this step, we will setup Oracle Cloud Migrations service in our tenancy to enable the migration and configure the required components.
-
Log in to the OCI Tenancy. From the navigation menu, go to Migration & Disaster Recovery, click Cloud Migrations, and then click Remote connections.
-
We need to Create a Source environment in the Compartment chosen (or created) for Oracle Cloud Migrations. We have already configured the policies as part of the pre-requisites. As the name suggests, this is needed to define the source location for the migration assets. The Source environment contains the set of external resources grouped physically or logically.
-
Click Create Source environment, enter the Name and make sure you select the correct compartment.
-
-
Once the Source environment is ready, click on the environment name provided in the previous step.
-
On the source environment details page, click Download agent VM to download the OCB agent. The agent will be deployed in the on-premises vSphere environment.
-
Configure the Agent dependency the VDDK in source environment.
-
Click on the Source environment and left side under resources section access Agent dependencies.
-
Click Create agent Dependency, Select from object storage, Compartment name.
-
Enter a name for the Agent dependency, Dependency type VDDK, and select the object storage bucket.
-
Note the bucket where we uploaded the VDDK in Prerequisites - Step 6 and select the VDDK dependency from the same bucket and create.
-
-
Deploy the OCB agent.
-
Deploy OVA in the network which has access to your vCenter network and DNS name resolution.
-
You must have two network adapters attached to the OCB agent VM.
-
One adapter should have access to the management components VC, ESXI host and other Network adapter should have access to Internet and OCI tenancy.
Note: Refer to Remote agent dependency page to know more about OCB agent connectivity: Network connectivity in External Enviornment.
-
-
Deploy the OCB Agent OVA in the source vCenter server and provide the configuration details. You assign this OVA IP Manually or by DHCP As well. This OCB agent is the medium to establish the connection between Oracle Cloud Migrations service and on-premises vCenter server.
-
Once the OCB agent is deployed, make sure that its network is reachable to the OCI tenancy. For example: If then tenancy is in Frankfurt Region then to verify the connectivity to this region:
-
We need deploy a separate Linux/Windows VM in same network and use curl command:
curl-v https://cloudbridge.eu-frankfurt-1.oci.oraclecloud.com/
,curl -v https://cloudmigration.eu-frankfurt-1.oci.oraclecloud.com/, https://auth.eu-frankfurt-1.oraclecloud.com/
. -
This test will make sure that your OCB agent is having the connectivity to the OCI tenancy and region where it must be registered.
-
-
Let’s register the OCB agent with OCI Tenancy.
-
To register the agent, log in to the OCI tenancy.
-
Go to Cloud migrations, Remote connections, Source environments, and then click Register agent.
-
Click on the Register agent tab.
-
In the Wizard, provide the OCB Agent host name or IP address.
-
Click on the registration. For more information, see OCB Registration..
-
-
Once the OCB agent is registered with your OCI tenancy, verify the health of your OCB agent and its components.
-
Navigate to Migration & Disaster Recovery, Cloud migrations, and then click Remote connections.
-
Select the source environment created in above steps.
-
Verify the remote connection agents State as active and Heartbeat as Healthy.
-
-
Click on remote connections agent name and verify the status of the listed Plugins Discovery, Gomon, and replication health. It should be in active state.
Task 2: Point your Oracle Cloud Migrations service to vCenter and fetch the on-premises VM details
-
Create asset source: go to Cloud migrations, Discovery, Asset sources, Create Asset Source.
-
In the wizard, provide the relevant information like Asset Source information, Name, vCenter Endpoint in this format: https://vcenter-FQDN:443/sdk. You need to make sure you use VC FQDN name instead of VC IP address otherwise migration might fail.
-
We need to provide the details of the source and target compartment. The compartment in which virtual machine inventory will be stored.
-
The target compartment details where the virtual machines will be created during the migration.
-
Select the source and target compartment.
-
Source environment > select the discovery credentials.
-
Vault and secret keys. Which was created in prerequisites section.
-
This secret key and credentials will allow the Oracle Cloud Migrations service to interact with your VC.
-
-
Once the asset source is created click on the newly created asset source name and verify the Replication and discovery connection state it should be in active. Click Run Discovery.
-
At this point, the OCB agent will fetch the VM information from the on-premises environment and list them under assets on the same page.
-
OR You can view the list of the discovered virtual machines, by going to Migration & Disaster Recovery, Cloud migrations, Discovery, Asset source details.
-
Once the list has been verified, we can confirm that the on-premises VM inventory details have been pulled by the Oracle Cloud Migrations service.
-
-
We will now proceed to create the migration project and plan, as covered in the next task.
Task 3: Create the Migration project and plan
In order to proceed with the migration, we first need to create the migration project and plan as per your migration strategy. For example, we will decide the order of operation as per specific application requirements. This will reflect in the migration plan.
Note: At this point, we can decide to create a simple project or create a comprehensive project and plan. For this tutorial, we will use the simple migration project and create the plan separately.
-
Go to Cloud migrations, Migrations, Create migration project, and then click Create a simple migration project.
-
Provide a name for your new migration project, select the required compartment and click Create.
-
On the migration project page, you will see your newly created project. Click on the name to open the details and configuration page.
-
On this page under migration plans, click Create migration plan to proceed with details of your migration project.
-
In the Create migration plan wizard, provide the following information:
- Display Name
- Compartment Name
- Target Compartment - In case the final placement of resources is different from source compartment
- Strategies
- Target environment information: VCN & subnet
-
Once all the information has been provided and verified, click Create migration plan.
Note: The strategies allow for selection of an as-is migration by default or you can choose if your workload is CPU intensive or memory intensive.
-
On successful creation of the migration plan, you will see the name of the newly created plan on your screen. Click on this to add details to your migration plan.
-
Under resources section on the screen go to the Migration assets, and then click Add migration assets. This will open the add migration assets wizard.
-
In the Add assets wizard, click Add from OCM Inventory to select the discovered assets.
-
Select the virtual machines that you want to add to this migration plan. Once all required VMs are selected from the list, click Add migration assets.
-
This will bring us back to the wizard, where we can verify the selected list. Once the assets have been verified, click Next.
-
On the next screen, we provide information regarding the replication target. Select the AD, Compartment & Object Storage Bucket from the Default replication location section. Once all information has been checked, click Select.
-
Click Submit to complete the wizard.
-
-
Once the assets have been added, they will appear on the migration plan window under Migration assets. At this point, we will select the VM(s) for replication. Under migration assets, choose the required virtual machines and Click Actions, and then click Replicate to initiate the replication process.
-
The replication job will start and can be tracked under Cloud migrations, Migration projects, Work Requests section.
-
In addition to checking the status of the replication in the OCI Console, we can also track the progress in vCenter server.
-
Login to vCenter and select the source virtual machines, Monitor, Tasks.
-
We will be able observe that Oracle Cloud Migrations service has started taking snapshot for this virtual machine. This will be removed once the replication is complete.
-
-
Once the replication is complete we can see the VM by going to the Target assets view in the migration plan.
- We will observe here that Oracle Cloud Migrations has selected recommended shapes for the VM on the basis of original configuration. For example, CPU, RAM and Storage.
Note: Steps 10-13 are optional and should be followed in case you want to modify the target virtual machine configuration.
-
In case, there is a requirement to change the configuration of the VM in OCI, we can make the modification from the console. We can change the Availability domain, Compartment, VCN or Compute Shape for the VM.
-
Go to the migration projects, Migration project name, Migration plan details, Left side Resources, Target Assets, select the target assets, click on the ellipsis on the right side and select Configure.
-
In the configuration window, you can change the following configuration for the selected virtual machine:
- Display Name
- Compartment
- VM Configuration - On-demand capacity, Preemptible capacity, Capacity reservation, Dedicated host.
- Shape type: Use system recommendation or Select preferred shape. For more information, see OCI Instance Capacity Types
- Network - VCN, Subnet & Public IP Address Information
- Storage - Block Volume Size and Performance
-
Click Configure.
Task 4: Create and execute the RMS stack
As replication has been completed, now we have the required volumes of the VM and metadata of the target in OCI Object Storage.
To create the instance from this data in OCI we need generate the Resource Manager (RMS) stack. This will create the new instance from the replicated data of the original on-premises VM in the OCI tenancy. With the help of the RMS Stack, we can provision the instances from replicated VM’s data and we can verify the costing of this instance from the same page.
-
Go to Migration projects, Migration project name, Migration project plan and choose your current migration plan.
-
Click Generate RMS Stack.
-
-
Once the Stack is created, you are ready to deploy it. Click Deploy RMS Stack.
-
To verify the creation of the VM, go to Compute, instances and check the status of the newly created VM deployed as part of this migration
-
Access the migrated VM from OCI local console or Cloud shell console or you can also RDP if it is a Windows server and verify if everything is ok and move to next task.
Task 5: Cutover and Cleanup
Once the selected assets are migrated and validation is complete, we need to mark the project as complete. This will block the migration modules to resync again with the source environment.
-
Navigate to Migration, Cloud Migrations, Migrations, Migration Project details.
-
Select the migration project name, select the migration plan and click Mark migration complete.
Note: To restart the same migration plan which we marked as complete above, repeat Step 2.
Related Links
Acknowledgments
- Author - Ravindra Kumar (Cloud VMware Solutions Specialist)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Migrate VMs from an on-premises VMware environment to Oracle Cloud Compute VMs using Oracle Cloud Migrations service
F79991-02
August 2023
Copyright © 2023, Oracle and/or its affiliates.