This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Module 2 - HCX for VM Migration

Module 2: Deploy HCX for VM Migration

Introduction to VMware HCX

VMware HCX™ is an application mobility platform designed for simplifying application migration, workload rebalancing and business continuity across data centers and clouds. HCX supports the following types of migrations:

  • Cold Migration - Offline migration of VMs.
  • Bulk Migration - scheduled bulk VM (vSphere, KVM, Hyper-V) migrations with reboot – low downtime.
  • HCX vMotion - Zero-downtime live migration of VMs – limited scale.
  • Cloud to Cloud Migrations – direct migrations between VMware Cloud SDDCs moving workloads from region to region or between cloud providers.
  • OS Assisted Migration – bulk migration of KVM and Hyper-V workloads to vSphere (HCX Enterprise feature).
  • Replication Assisted vMotion - Bulk live migrations with zero downtime combining HCX vMotion and Bulk migration capabilities (HCX Enterprise feature).

In this module, we will go through the steps to Install HCX, configure and migrate a test VM to Azure VMware Solution (AVS).

For more information on HCX, please visit VMware’s HCX Documentation.

HCX Setup for Azure VMware Solution (AVS)

Prerequisites

  • Ensure that Module 1 has been completed successfully as this will be required to connect HCX from AVS to the On-Premises Lab.
  • Ability to reach out to vCenter portal from Jumpbox VM:
    • AVS vCenter: Get IP from Azure Portal - AVS blade
    • On-premises vCenter: 10.X.Y.2

Remember that X is your group number and Y your participant number.

1 - Module 2 Task 1

Task 1 : Install VMware HCX on AVS Private Cloud

Exercise 1: Enable HCX on AVS Private Cloud

In the following task, we will be installing HCX on your AVS Private Cloud. This is a simple process from the Add-ons section in the Azure Portal, or via Bicep/ARM/PowerShell.

NOTE: This task may or may not have been completed for you in your AVS environment. Only one participant per group can enable HCX in the SDDC so if you’re not the first participant in the group to enable HCX, just use these instructions for reference.

Step 1: Navigate to your SDDC

Navigate to your SDDC in Azure portal

  1. Navigate to the Azure Portal, search for Azure VMware Solution in the search bar.
  2. Click on Azure VMware Solution.

Step 2: Locate your AVS SDDC

Locate your AVS SDDC in Azure portal

  1. Select the private cloud assigned to you or your group.

Step 3: Enable HCX on your AVS Private Cloud

Enable HCX on your AVS Private Cloud

  1. From your Private Cloud blade, click on + Add-ons.
  2. Click Migration using HCX.
  3. Select the checkbox to agree with terms and conditions.
  4. Click Enable and deploy.

HCX will start getting deployed in your AVS Private Cloud and it should take about 10-20 minutes to complete.

2 - Module 2 Task 2

Task 2: Download the HCX OVA to On-Premises vCenter

Exercise 1: Download HCX OVA for Deployment of HCX on-premises

The next step is to download HCX onto our On-Premises VMware environment, this will allow us to setup the connectivity to AVS and allow us to migrate. The HCX appliance is provided by VMware and has to be requested from within the AVS HCX Manager.

Step 1: Locate AVS SDDC Identity Information

Locate AVS SDDC Identity Information

  1. Obtain the AVS vCenter credentials by going to your AVS Private Cloud blade in the Azure portal, select VMware credentials.
  2. cloudadmin@vsphere.local is the local vCenter user for AVS, keep this handy.
  3. You can copy the Admin password to your clipboard and keep it handy as well.

Step 3: Locate HCX Cloud Manager IP

Locate HCX Cloud Manager IP

  1. In your AVS Private Cloud blade, click + Add-ons.
  2. Click Migration using HCX.
  3. Copy the HCX Cloud Manager IP URL, open a new browser tab and paste it, and enter the cloudadmin credentials obtained above.

The Request Download Link button will be grayed out initially but will be live after a minute or two. Do not navigate away from this page. Once available, you will have an option to Download the OVA or Copy a Link.

This link is valid for 1 week.

3 - Module 2 Task 3

Task 3: Import the OVA file to the On-Premises vCenter

Import the OVA file to the On-Premises vCenter

In this step we will import the HCX appliance into the on premises vCenter.

You can choose to do this Task in 2 different ways:

Step 1: Obtain your AVS vCenter Server credentials

Obtain your AVS vCenter Server credentials

  1. In your AVS Private Cloud blade click Identity.
  2. Locate and save both vCenter admin username cloudadmin@vsphere.local and password.

Step 2: Locate HCX Cloud Manager IP

Locate HCX Cloud Manager IP

  1. Click on + Add-ons.
  2. Copy the HCX Cloud Manager IP.

Step 3: Log in to HCX Cloud Manager IP

Log in to HCX Cloud Manager IP

Open a browser tab and paste the HCX Cloud Manager IP and enter the credentials obtained in the previous step.

  1. In the left pane click System Updates.

Request Download Link for HCX OVA

  1. Click REQUEST DOWNLOAD LINK, please keep in mind that the button might take a couple of minutes to become enabled.

HCX download links

Option 1: Download and deploy HCX OVA to on-premises vCenter

  1. Click VMWARE HCX to download the HCX OVA localy.

Option 2: Deploy HCX from a vCenter Content Library

  1. Click COPY LINK if you will install HCX with this method.

Step 1: Access Content Libraries from on-premises vCenter

Browse to the on-premises vCenter URL, See Getting Started section for more information and login details.

Access Content Libraries from on-premises vCenter

  1. From your on-premises vCenter click Menu.
  2. Click Content Libraries.

Step 2: Create a new Content Library

Create a new Content Library

Create a new local content library if one doesn’t exist by clicking the + sign.

Step 3: Import Item to Content Library

Import Item to Content Library

  1. Click ACTIONS.
  2. Click Import Item.

Enter the HCX URL copied in a step 1

  1. Enter the HCX URL copied in a previous step.
  2. Click IMPORT.

Accept any prompts and actions and proceed. The HCX OVA will download to the library in the background.

4 - Module 2 Task 4

Task 4: Deploy the HCX OVA to On-Premises vCenter

Deploy HCX OVA

In this step, we will deploy the HCX VM with the configuration from the On-Premises VMware Lab Environment section.

Step 1: Deploy HCX connector VM

If Option 1: Deploy OVA from download.

Deploy OVF Template from download

  1. Right-click Cluster-1.
  2. Click Deploy OVF Template.

Select the OVA Template

  1. Click the button to point to the location of the downloaded OVA for HCX.
  2. Click NEXT.

If Option 2: Deploy HCX from Content Library

Create new VM from Template

  1. Once the import is completed from the previous task, click Templates.
  2. Right Click the imported HCX template.
  3. Click New VM from This Template.

Select a Name and Folder

  1. Give your HCX Connector a name: HCX-OnPrem-X-Y, where X is your group number and Y is your participant number.
  2. Click NEXT.

Step 2: Name the HCX Connector VM

Name the HCX Connector VM

  1. Give your HCX Connector a name: HCX-OnPrem-X-Y, where X is your group number and Y is your participant number.
  2. Click NEXT.

Step 3: Assign the network to your HCX Connector VM

Assign the network to your HCX Connector VM

Keep the defaults for:

  • Compute Resource
  • Review details
  • License agreements (Accept)
  • Storage (LabDatastore)
  1. Click to select management network.
  2. Click NEXT.

Step 4: Customize template

Customize template

PropertyValue
HostnameSuggestion: HCX-OnPrem-X-Y) Note: Do not leave a space in the name as this causes the webserver to fail)
CLI “admin” User Password/root PasswordMSFTavs1!
Network 1 IPv4 Address10.X.Y.9
Network 1 IPv4 Prefix Length27
Default IPv4 Gateway10.X.Y.1
DNS Server list1.1.1.1

Step 5: Validate deployment

Once done, navigate to Menu > VM’s and Templates > Power on the newly created HCX Manager VM.

The boot process may take 10-15 minutes to complete.

5 - Module 2 Task 5

Task 5: Obtain HCX License Key

Obtain HCX License Key

While the HCX installation runs, we will need to obtain a license key to activate HCX. This is available from the AVS blade in the Azure Portal.

Step 1: Create HCX Key from Azure Portal

Create HCX Key from Azure Portal

  1. Click + Add-ons.
  2. Click + Add.
  3. Give your HCX Key a name: HCX-OnPrem-X-Y, where X is your group number and Y your participant number.
  4. Click Yes.

Save the key, you will need it to activate it in your on-premises setup.

6 - Module 2 Task 6

Task 6: Activate VMware HCX

Activate VMware HCX

In this task, we will activate the On-Premises HCX appliance that we just deployed in Task 4.

Step 1: Log in to HCX Appliance Management Interface

Log in to HCX Appliance Management Interface

  1. Browse to the On-Premises HCX Manager IP specified in Task 4 on port 9443 IP and login (Make sure you use https:// in the address bar in the browser).
  2. Login using the HCX Credentials specified in Task 4.
    • Username: admin
    • Password: MSFTavs1! (Specified earlier in Task 4).

Step 2: Enter HCX Key

Enter HCX Key

Once logged in, follow the steps below.

  1. Don’t change the HCX Activation Server field. Please keep as is.
  2. In HCX License Key field, please enter your key for HCX Activation Key that you obtains from AVS blade in Azure Portal.
  3. Lastly, select Activate. Please keep in mind that this process can take several minutes.

Step 3: Enter Datacenter Location, System Name

Enter Datacenter Location, System Name

In Datacenter Location, provide the nearest biggest city to your location for installing the VMware HCX Manager On-Premises. Then select Continue. In System Name, modify the name to HCX-OnPrem-X-Y and click Continue.

Note: The city location does not matter in this lab. It’s just a named location for visualization purposes.

Step 4: Continue to complete configuration

Continue to complete configuration

Click “YES, CONTINUE” for completing next task. After a few minutes HCX should be successfully activated.

7 - Module 2 Task 7

Task 7: Configure HCX and connect to vCenter

Configure On-Premises HCX

In this section, we will integrate and configure HCX Manager with the On-Premises vCenter Server.

Step 1: Connect vCenter Server

Connect your vCenter Server

  1. In Connect your vCenter, provide the FQDN or IP address of on-premises vCenter server and the appropriate credentials.
  2. Click CONTINUE.

Step 2: Configure SSO/PSC

Configure SSO/PSC

  1. In Configure SSO/PSC, provide the same vCenter IP address: https://10.X.Y.2
  2. Click CONTINUE.

Step 3: Restart HCX Appliance

Restart HCX appliance to save changes

Verify that the information entered is correct and select RESTART.

HCX configuration dashboard after restart

  1. After the services restart, you’ll see vCenter showing as Green on the screen that appears. Both vCenter and SSO must have the appropriate configuration parameters, which should be the same as the previous screen.
  2. Next, click on Configuration to complete the HCX configuration.

Edit the HCX Administrator role mapping configuration

  1. Click Configuration.
  2. Click HCX Role Mapping.
  3. Click Edit.
  4. Change User Groups value to match lab SSO configuration: avs.lab\Administrators
  5. Save changes.

Please note that by default HCX assigns the HCX administrator role to “vsphere.local\Administrators”. In real life, customers will have a different SSO domain than vsphere.local and needs to be changed. This is the case for this lab and this needs to be changed to avs.lab.

8 - Module 2 Task 8

Task 8: Create Site Pairing from On-premises HCX to AVS HCX

HCX Site Pairing

In this task, we will be creating the Site Pairing to connect the On-Premises HCX appliance to the AVS HCX appliance.

Step 1: Access On-Premises HCX

Refrehs On-Premises vCenter UI to load HCX plugin

There are 2 ways to access HCX:

  1. Through the vCenter server plug-in. Click Menu -> HCX.
  2. Through the stand-alone UI. Open a browser tab and go to your local HCX Connector IP: https://10.X.Y.9 In either case, log in with your vCenter credentials:
    • Username: administrator@avs.lab
    • Password: MSFTavs1!

NOTE: If working through vCenter Server, you may see a banner item to Refresh the browser, this will load the newly installed HCX modules. If you do not see this, log out and log back into vCenter.

Step 2: Connect to Remote Site

Connect to remote site

  1. Click Site Pairing in the left pane.
  2. Click CONNECT TO REMOTE SITE.

Step 3: Enter Remote (AVS) HCX Information

Remote site configuration wizard

  1. Enter credentials for your AVS vCenter found in the Azure Portal. The Remote HCX URL is found under the Add-ons blade and it is NOT the vCenter URL.
  2. Click CONNECT.
  3. Accept certificate warning and Import

NOTE: Ideally the identity provided in this step should be an AD based credential with delegation instead of the cloudadmin account.

Established site pairing

Connection to the remote site will be established.

9 - Module 2 Task 9

Task 9: Create network profiles

HCX Network Profiles

A Network Profile is an abstraction of a Distributed Port Group, Standard Port Group, or NSX Logical Switch, and the Layer 3 properties of that network. A Network Profile is a sub-component of a complete Compute Profile.

Customer’s environments may vary and may not have separate networks.

In this Task you will create a Network Profile for each network intended to be used with HCX services. More information can be found in VMware’s Official Documentation, Creating a Network Profile.

  • Management Network - The HCX Interconnect Appliance uses this network to communicate with management systems like the HCX Manager, vCenter Server, ESXi Management, NSX Manager, DNS, NTP.
  • vMotion Network - The HCX Interconnect Appliance uses this network for the traffic exclusive to vMotion protocol operations.
  • vSphere Replication Network - The HCX Interconnect Appliance uses this network for the traffic exclusive to vSphere Replication.
  • Uplink Network - The HCX Interconnect appliance uses this network for WAN communications, like TX/RX of transport packets.

These networks have been defined for you, please see below section.

In a real customer environment, these will have been planned and identified previously, see here for the planning phase.

Step 1: Create 4 Network Profiles

Create Network Profile

  1. Click Interconnect.
  2. Click Network Profiles.
  3. Click CREATE NETWORK PROFILE.

In this lab, these are in the Network Profile Information section.

We will create 4 separate network profiles:

Step 2: Enter information for each Network Profile

Enter information for each Network Profile

  1. Select Distributed Port Groups.
  2. Select Management Network.
  3. Enter the Management Network IP range from the table below. Remeber to replace X with your group number and Y with your participant number. Repeat the same steps for Replication, vMotion and Uplink Network profiles.
  4. Ensure the select the appropriate checkboxes depending on type of Network Profile you’re creating.

You should create a total of 4 Network Profiles.

Network Profile Information

Management Network Profile

PropertyValue
Management Network IP10.X.Y.10-10.X.Y.16
Prefix Length27
Management Network Gateway10.X.Y.1
PropertyValue
Uplink Network IP10.X.Y.34-10.X.Y.40
Prefix Length28
Uplink Network Gateway10.X.Y.33
DNS1.1.1.1

vMotion Network Profile

PropertyValue
vMotion Network IP10.X.Y.74-10.X.Y.77
Prefix Length27
vMotion Network Gateway10.X.Y.65
DNS1.1.1.1

Replication Network Profile

PropertyValue
Replication IP10.X.Y.106-10.X.Y.109
Prefix Length27
Replication Network Gateway10.X.Y.97
DNS1.1.1.1

10 - Module 2 Task 10

Task 10: Create compute profiles

HCX Compute Profile

A compute profile contains the compute, storage, and network settings that HCX uses on this site to deploy the interconnected dedicated virtual appliances when service mesh is added. For more information on compute profile and its creation please refer to VMware documentation.

Step 1: Compute Profile Creation

Compute Profile Creation

  1. In your on-premises HCX installation, click Interconnect.
  2. Click Compute Profiles.
  3. Click CREATE COMPUTE PROFILE.

Step 2: Name Compute Profile

Name Compute Profile

  1. Give your Compute Profile a Name. Suggestion: OnPrem-CP-X-Y, where X is your group number and Y is your participant number.
  2. Click CONTINUE.

Step 3: Select Services for Compute Profile

Select Services for Compute Profile

  1. Review the selected services. By default all the above services are selected. In a real world scenario, if a customer let’s say doesn’t need Network Extension, you would unselect that service here. Leave all defaults for the purpose of this workshop.
  2. Click CONTINUE.

Step 4: Select Service Resources

Select Service Resources

  1. Click the arrow next to Select Resource(s).
  2. In this on-premises simulation, you only have one Cluster called OnPrem-SDDC-Datacenter-X-Y. In a real world scenario, it’s likely your customer may have more than one Cluster. HCX Service Resources are resources from where you’d like HCX to either migrate or protect VMs from. Select the top level OnPrem-SDDC-Datacenter-X-Y.
  3. Click OK.
  4. Click CONTINUE.

Step 5: Select Deployment Resources

Select Deployment Resources

  1. Click the arrow next to Select Resource(s). Here you will be selecting the Deployment Resource, which is where the additional HCX appliances needing to be installed will be placed in the on-premises environment. Select OnPrem-SDDC-Cluster-X-Y.
  2. For Select Datastore click and select the LabDatastore that exists in your simulated on-premises environment. This will be the on-premises Datastore the additional HCX appliances will be placed in.
  3. (Optional) click to Select Folder in the on-premises vCenter Server where to place the HCX appliances. You can select vm for example.
  4. Interconnect Appliance Reservation Settings, here you would set CPU/Memory Reservations for these appliances in your on-premises vCenter Server.
    • Leave the default 0% value.
  5. Click CONTINUE.

Step 6: Select Management Network Profile

Select Management Network Profile

  1. Select the Management Network Profile you created in a previous step.
  2. Click CONTINUE.

Select Uplink Network Profile

  1. Select the Management Network Profile you created in a previous step. DO NOT select the uplink network profile, this network profile was created to simulate what an on-premises environment might look like, but the only functional uplink network for this lab is the Management Network.
  2. Click CONTINUE.

Step 8: Select vMotion Network Profile

Select vMotion Network Profile

  1. Select the vMotion Network Profile you created in a previous step.
  2. Click CONTINUE.

Step 9: Select vSphere Replication Network Profile

Select vSphere Replication Network Profile

  1. Select the vSphere Replication Network Profile you created in a previous step.
  2. Click CONTINUE.

Step 10: Select Network Containers

Select Network Containers

  1. Click the arrow next to Select Network Containers.
  2. Select the virtual distributed switch you’d like to make eligible for Network Extension.
  3. Click CLOSE.
  4. Click CONTINUE.

Step 11: Review Connection Rules

Review Connection Rules

  1. Review the connection rules.
  2. Click CONTINUE.

Step 12: Finish creation of Compute Profile

Finish creation of Compute Profile

Click FINISH to create the compute profile.

Compute Profile is created successfully

Your Compute Profile is created successfully.

11 - Module 2 Task 11

Task 11: Create a service mesh

HCX Service Mesh Creation

An HCX Service Mesh is the effective HCX services configuration for a source and destination site. A Service Mesh can be added to a connected Site Pair that has a valid Compute Profile create on both of the sites.

Adding a Service Mesh initiates the deployment of HCX Interconnect virtual appliances on both sites. An interconnect Service Mesh is always created at the source site.

More information can be found inf VMware’s Official Documentation, Creating a Service Mesh.

Step 1: Create Service Mesh

Create Service Mesh

  1. Click Interconnect.
  2. Click Service Mesh.
  3. Click CREATE SERVICE MESH.

Step 2: Select Sites

Select Sites

  1. Select the source site (on-premises).
  2. Select the destination site (AVS).
  3. Click CONTINUE.

Step 3: Select Compute Profiles

Select Compute Profiles

  1. Click to select Source Compute Profile which you recently created, click CLOSE.
  2. Click to select Remote Compute Profile from AVS side, click CLOSE.
  3. Click CONTINUE.

Step 4: Select Services to be Activated

Select Services to be Activated

Leave the Default Services and click CONTINUE.

Advanced Configuration - Override Uplink Network Profiles

  1. Click to select the previously created Source Management Network Profile, click CLOSE. Even though you created an Uplink Network Profile, for the purpose of this lab, the management network is used for uplink.
  2. Click to select the Destination Uplink Network Profile (usually TNTXX-HCX-UPLINK), click CLOSE.
  3. Click CONTINUE.

Step 6: Advanced Configuration: Network Extension Appliance Scale Out

Advanced Configuration: Network Extension Appliance Scale Out

In Advanced Configuration – Network Extension Appliance Scale Out, keep the defaults and then click CONTINUE.

Step 7: Advanced Configuration - Traffic Engineering

Advanced Configuration - Traffic Engineering

In Advanced Configuration – Traffic Engineering, review, leave the defaults and click CONTINUE.

Step 8: Review Topology Preview

Review Topology Preview

Review the topology preview and click CONTINUE.

Step 9: Ready to Complete

Ready to Complete

  1. Enter a name for your Service Mesh (SUGGESTION: HCX-OnPrem-X-Y, where X is your group number, Y your participant number).
  2. Click FINISH.

Note: the appliance names are derived from service mesh name (it’s the appliance prefix, essentially).

Step 10: Confirm Successful Deployment

Confirm Successful Deployment

The Service Mesh deployment will take 5-10 minutes to complete. Once successful, you will see the services as green. Click on VIEW APPLIANCES.

Confirm Successful Deployment - finished

  1. You can also navigate by clicking Interconnect - Service Mesh.
  2. Click Appliances.
  3. Check for Tunnel Status = UP.

You’re ready to migrate and protect on-premises VMs to Azure VMware Solution using VMware HCX. Azure VMware Solution supports workload migrations (with or without a network extension). So you can still migrate workloads in your vSphere environment, along with On-Premises creation of networks and deployment of VMs onto those networks.

For more information, see the VMware HCX Documentation.

12 - Module 2 Task 12

Task 12: Network Extension

HCX Network Extension

You can extend networks between and HCX-activated on-premises environment and Azure VMware Solution (AVS) with HCX Network Extension.

With VMware HCX Network Extension (HCX-NE), you can extend a VM’s network to a VMware HCX remote site like AVS. VMs that are migrated, or created on the extended network at the remote site, behave as if they exist on the same L2 network segement a VMs in the source (on-premises) environment. With Network Extension from HCX, the default gateway for an extended network is only connected at the source site. Traffic from VMs in remote sites must be routed to a different L3 network will flow through the source site gateway.

With VMware HCX Network Extension you can:

  • Retain the IP and MAC addresses of the VMs and honor existing network policies.
  • Extend VLAN-tagged networks from a VMware vSphere Distributed Switch.
  • Extend NSX segments.

For more information please visit VMware’s documentation for Extending Networks with VMware HCX.

Once the Service Mesh appliances have been deployed, the next important step is to extend the on-premises network(s) to AVS, so that any migrated VM’s will be able to retain their existing IP address.

Step 1: Network Extension Creation

Start Network Extension creation wizard

  1. Click Network Extension.
  2. Click CREATE A NETWORK EXTENSION.

Step 2: Select Source Networks to Extend

Select Source Networks to Extend

  1. Select Service Mesh - Ensure you select your own Service Mesh you created in an earlier step.
  2. Select OnPrem-workload-X-Y network.
  3. Click NEXT.

Step 3: Configure Network Extension

Configure Network Extension settings

  1. Destination First Hop Router
    • If applicable, ensure your own NSX-T T1 router you created earlier is selected.
    • Otherwise, select the TNT**-T1 router.
  2. Enter the Gateway IP Address / Prefix Length for the OnPrem-workload-X-Y network. You can find this information in the On-Premises Lab Environment section.
    • Example: 10.X.1Y.129/25, where X is your group number and Y is your participant number.
  3. Ensure your own Extension Appliance is selected.
  4. Confirm your own T1 is selected under Destination First Hop Router.
  5. Click SUBMIT.

It might take 5-10 minutes for the Network Extension to complete.

Step 4: Confirm Status of Network Extension

Confirm Status of Network Extension

Confirm the status of the Network Extension as Extension complete.

13 - Module 2 Task 13

Task 13: Migrate a VM using HCX vMotion

Migrate a VM using HCX vMotion

Now that your Service Mesh has deployed the additional appliances HCX will utilize successfully, you can now migrate VMs from your on-premises environment to AVS. In this module, you will migrate a test VM called Workload-X-Y-1 that has been pre-created for you in your simulated on-premises environment using HCX vMotion.

Exercise 1: Migrate VM to AVS

Step 1: Examine VM to be migrated

Examine VM to be migrated

  1. Click the VMs and Templates icon in your on-premises vCenter Server.
  2. You will find the VM named Workload-X-Y-1, select it.
  3. Notice the IP address assigned to the VM, this should be consistent with the network you stretched using HCX in a previous exercise.
  4. Notice the name of the Network this VM is connected to: OnPrem-workload-X-Y.
  5. (Optional) You can start a ping sequence to check the connectivity from your workstation to the VM’s IP address.

Step 2: Access HCX Interface

Access HCX Interface

  1. From the vCenter Server interface, click Menu.
  2. Click HCX.

You can also access the HCX interface by using its standalone interface (outside vCenter Server interface) by opening a browser tab to: https://10.X.Y.9, where X is your group number and Y is your participant number.

Step 3: Initiate VM Migration

Initiate VM Migration

  1. From the HCX interface click Migration in the left pane.
  2. Click MIGRATE.

Step 4: Select VMs for Migration

Select VMs for Migration

  1. Search for the location of your VM.
  2. Click the checkbox to select your VM named Workload-X-Y-1.
  3. Click ADD.

Step 5: Transfer and Placement of VM on Destination Site

Transfer and Placement of VM on Destination Site

Transfer and Placement options can be entered in 2 different ways:

  1. If you’ve selected multiple VMs to be migrated and all VMs will be placed/migrated with the same options, setting the options in the area with the green background will set the options for all VMs.
  2. To set the options individually per VM can be set and they can be different from each other.
  3. Click either GO or VALIDATE button. Clicking VALIDATE will validate that the VM can be migrated (This will not migrate the VM). Clicking GO will both validate and migrate the VM.

Use the following values for these options:

OptionValue
Compute ContainerCluster-1
Destination FolderDiscovered virtual machine
StoragevsanDatastore
FormatSame format as source
Migration ProfilevMotion
Switchover ScheduleN/A

Step 6: Monitor VM Migration

Monitor VM Migration

As you monitor the migration of your VM, keep an eye on the following areas:

  1. Percentage status of VM migration.
  2. Sequence of events as the migration occurs.
  3. Cancel Migration button (do not use).

Step 7: Verify Completion of VM Migration

Verify Completion of VM Migration

Ensure your VM was successfully migrated. You can also check for the VM in your AVS vCenter to Ensure it was migrated.

Exercice 2: Migration rollback

Step 1: Reverse Migration

Reverse Migration

VMware HCX also supports Reverse Migration, migrating from AVS back to on-premises.

  1. Click Reverse Migration checkbox.
  2. Select the Discovered virtual machine folder.
  3. Select your same virtual machine to migrate back to on-premises.
  4. Click ADD.

Use the following values for these options:

OptionValue
Compute ContainerOnPrem-SDDC-Cluster-X-Y
Destination FolderOnPrem-SDDC-Datacenter-X-Y
StorageLabDatastore
FormatSame format as source
Migration ProfilevMotion
Switchover ScheduleN/A

The rest of the steps are similar to what you did on Step 5.

Step 2: Verify Completion of VM Migration

Verify that the VM is back running on the On-Premises vCenter.

14 - Module 2 Task 14

Task 14: Migrate a VM using HCX Replication Assisted vMotion

HCX Replication Assisted vMotion (RAV) uses the HCX along with replication and vMotion technologies to provide large scale, parallel migrations with zero downtime.

HCX RAV provides the following benefits:

  • Large-scale live mobility: Administrators can submit large sets of VMs for a live migration.
  • Switchover window: With RAV, administrators can specify a switchover window.
  • Continuous replication: Once a set of VMs is selected for migration, RAV does the initial syncing, and continues to replicate the delta changes until the switchover window is reached.
  • Concurrency: With RAV, multiple VMs are replicated simultaneously. When the replication phase reaches the switchover window, a delta vMotion cycle is initiated to do a quick, live switchover. Live switchover happens serially.
  • Resiliency: RAV migrations are resilient to latency and varied network and service conditions during the initial sync and continuous replication sync.
  • Switchover larger sets of VMs with a smaller maintenance window: Large chunks of data synchronization by way of replication allow for smaller delta vMotion cycles, paving way for large numbers of VMs switching over in a maintenance window.

HCX RAV Documentation

Migrate a VM using HCX vMotion

As you are more comfortable now with HCX components, some steps will be less documented to provide you with the opportunity to discover new side of this tool by yourself.

Prerequisites

First thing, we need to check that Replication Assisted vMotion Migration feature is enabled on each of the following:

  • AVS HCX Manager Compute Profile
  • On premises Compute Profile
  • On premises Service Mesh

For example:

Enable Replication Assisted vMotion Migration on Compute Profiles and Service Mesh

If not enabled on one of the previous items, you need to:

  1. Edit the component
  2. Enable the Replication Assisted vMotion Migration capability
  3. Continue the wizard up to the Finish button (no other change is required)
  4. Click on Finish button to validate.

Note: Changes to the service mesh will require a few minutes to complete. You can look at Tasks tab to monitor the progress.

Exercise 1: Migrate VMs to AVS

Step 1: Initiate VMs migration

Initiate VMs migration

  1. From the HCX interface click Migration in the left pane.
  2. Click MIGRATE.

Step 2: Select VMs for Migration

  1. Search for the location of your VM.
  2. Click the checkbox to select your VM named Workload-X-Y-1 and Workload-X-Y-2.
  3. Click ADD.

Step 3: Transfer and Placement of VM on Destination Site

Transfer and Placement of VM on Destination Site

Use the following values for these options:

OptionValue
Compute ContainerCluster-1
Destination FolderDiscovered virtual machine
StoragevsanDatastore
FormatSame format as source
Migration ProfileReplication-assisted vMotion
Switchover ScheduleN/A

Click either GO or VALIDATE button. Clicking VALIDATE will validate that the VM can be migrated (This will not migrate the VM). Clicking GO will both validate and migrate the VM.

Step 4: Monitor VM Migration

As you monitor the migration of your VM, keep an eye on the following areas:

  1. Percentage status of VM migration.
  2. Sequence of events as the migration occurs.
  3. Cancel Migration button (do not use).

Step 5: Verify completion of VM Migration

Verify Completion of VM Migration

Ensure your VM was successfully migrated. You can also check for the VM in your AVS vCenter to Ensure it was migrated.

Exercice 2: Migration rollback

Step 1: Reverse Migration with switchover scheduling

VMware HCX also supports Reverse Migration, migrating from AVS back to on-premises.

  1. Click Reverse Migration checkbox.
  2. Select the Discovered virtual machine folder.
  3. Select your same virtual machines to migrate back to on-premises.
  4. Click ADD.

Use the following values for these options:

OptionValue
Compute ContainerOnPrem-SDDC-Cluster-X-Y
Destination FolderOnPrem-SDDC-Datacenter-X-Y
StorageLabDatastore
FormatSame format as source
Migration ProfileReplication-assisted vMotion
Switchover ScheduleSpecify a 1hr maintenance window timeframe starting at least 15 minutes from now.

Reverse Migration with switchover scheduling

The rest of the steps are similar to what you did on Step 5.

Step 2: Monitor a scheduled VM migration

After few minutes, Replication-assisted vMotion will start replicating virtual disks of the virtual machines to the destination.

When ready, the switchover will not happen before entering the maintenance window timeframe provided in the migration wizard. VM is still running on the source side. In the interval, replication will continue to synchronize disk changes to the target side.

On going VM replication

When the switchover scheduling is reached, the VM computation runtime, storage and network attachments will switch to the destination and the migration will complete with no downtime for the VM.

VM switchover

Note: The switchover may not happen as soon as we reach the maintenance window timeframe: it may take a few minutes to start.

After the switchover is completed, VM should be running in the destination.

Completed switchover

15 - Module 2 Task 15

Task 14: Observe the effects of extended L2 networks with and without MON

HCX L2 extended networks are virtual networks that span across different sites, allowing VMs to keep their IP addresses and network configuration when migrated or failed over.

HCX provides:

  • HCX Network Extension: This service creates an overlay tunnel between the sites and bridges the L2 domains, enabling seamless communication and mobility of VMs.
  • HCX Mobility Optimized Networking (MON): Improves network performance and reduces latency for virtual machines that have been migrated to the cloud on an extended L2 segment. MON provides these improvements by allowing more granular control of routing to and from those virtual machines in the cloud.

Observe the effects of extended L2 networks with and without MON

Prerequisites

Please migrate one of the workload VM to AVS side. You can select the migration method of your choice.

The VM needs to be migrated and powered-on to continue the Lab Task.

Assess the current routing path

From workstation, run a traceroute to get a view on current routing path.

From a windows command line, run: tracert IP_OF_MIGRATED_VM

Last network hop before the VM should be the On Prem routing device: 10.X.1Y.8.
Tracing route to 10.1.11.130 over a maximum of 30 hops
  1    23 ms    23 ms    22 ms  10.100.199.5
  2     *        *        *     Request timed out.
  3    23 ms    23 ms    23 ms  10.100.100.65
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6     *        *        *     10.1.1.8    # <------- On Premises router
  7    25 ms    24 ms    24 ms  10.1.11.130 # <------- Migrated VM

Step 1: Enable Mobility Optimized Networking on existing network extension

From HCX console, select the Network Extension menu and expand the existing extended network.

Then activate the Mobility Optimized Networking button.

Enable Mobility Optimized Networking on existing network extension

Accept the change by clicking on Enable when prompted for.

The change will take a few minutes to complete.

Step 4: Assess the current routing path after MON enablement

You can re-run a traceroute from jump server but no change to the routing path should be effective yet.

Step 5: Enable MON for the migrated VM

MON is effective at VM level, and so should be activated per VM (in an extended network where MON is already setup).

  1. From the Network Extension, and the expanded MON-enabled network, select the migrated VM.
  2. Select AVS side router location.
  3. Click on Submit.

Enable MON for the migrated VM

Step 6: Configure MON Policy routes

By default, MON redirect all the flow from the migrated VM to On Prem if they are matching RFC1918 subnets.

  • In the Lab setup, this is also a reason for the migrated VM to be unreachable at this stage if we do not customize Policy Routes.
  • In a real world scenario, not configuring Policy Routes, is often a reason of asymmetric traffic as incoming and outgoing traffic for/from the migrated VM could be not using the same path.

We will customize the Policy Routes to ensure that traffic for 10.0.0.0/8 will use the AVS side router location.

From the HCX console:

  1. Select the Network Extension menu, then the Advanced menu and the Policy Routes item.
  2. In the popup, remove the 10.0.0.0/8 network and validate the change.
  3. Wait a minute for the change to propagate.

Step 7: Assess the current routing path after MON enablement at VM level

You can re-run a traceroute from workstation and analyze the result:

Tracing route to 10.1.11.130 over a maximum of 30 hops
  1    23 ms    23 ms    22 ms  10.100.199.5
  2     *        *        *     Request timed out.
  3    23 ms    23 ms    23 ms  10.100.100.65
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6    24 ms    23 ms    23 ms  10.1.11.130 # <------- Migrated VM

There should be no 10.X.1Y.8 (as last hop) anymore as flow is directly routed by NSX to the target AVS VM with the help of a /32 static route set by HCX at the NSX-T T1 GW level.

16 - Module 2 Task 16

Task 15: Achieving a migration project milestone by cutting-over network extension

In a migration strategy, HCX L2 extended networks can be used to facilitate the transition of workloads from one site to another without changing their IP addresses or disrupting their connectivity. This can reduce the complexity and risks associated with reconfiguring applications, firewalls, DNS, and other network-dependent components.

Once a subnet is free from other resources On Premises, this is important to consider the last phase of the migration project: the network extension cutover.

This operation will provide a direct AVS connectivity for migrated workload, only relying on NSX-T components, and not anymore on the combination of HCX and On Premises network components.

In a large migration project, the cutover can be done network by network, based on the rhythm of workload migrations. When a subnet is free from On Premises resources, and firewall policies effective on AVS side, the cutover operation can be proceeded.

Achieving a migration project milestone by cutting-over network extension

Exercice 1: Perform a network extension cutting-over

Step 1: Migrate remaining workload to AVS

Ensure that all the On Premises workload attached to the extended network are migrated on AVS, except the router VM and the HCX-OnPrem-X-Y-NE-I1 appliance(s).

If not: migrate the VM to AVS.

Note: You can keep or remove MON on the extended network for the current exercice. It should not affect the end result.

Step 2: Start the network extension removal process

From HCX console, select the Network Extension menu. Select the Extended network and click on Unextend network.

Start the network extension removal process

In the next wizard, ensure that the Cloud Edge Gateway will be connected at the end of removal operation. Then submit.

Cloud Edge Gateway will be connected

You can proceed to the next step while the current operation is running.

Step 3: Shutdown On Premises network connectivity to the subnet

For the current lab setup, the On Premises connectivity to the migrated subnet is handled by a Static Route set on an NSX-T T1 gateway. We will remove this rule to simulate the end of BGP route advertising from On Premises.

On a real-world scenario, the change could be to shutdown a virtual interface on a router or a Firewall device to achieve the end of BGP route advertising for the subnet.

  1. Connect to NSX-T Manager console by using credentials from AVS SDDC Azure UI.
  2. Click on Networking tab, then Tier-1 Gateways section.
  3. Select the TNTXX-T1 gateway and start the edition of the component.

Edit Tier-1 Static Routes

  1. From the edit pane, click on the Static Routes link to edit this section (the number will vary depending on the number of effectives routes).
  2. Remove the route associated with your Lab based on its name and the target network.

Remove Static Route for your lab

  1. Validate the change.
  2. Monitor the process of the network extension removal on HCX.

Step 5: Network connectivity checks

When operation is ended, check the network connectivity to one of the migrated VM on the subnet.

You can use a ping from your workstation up to the VM IP address.

The connectivity should be ok.

Exercice 2: Rollback if needed!

Note: The following content is only there to provide guidance in case you need or choose to roll back the network setup to its previous configuration.

Step 1: Roll back changes

Running this step is not part of the Lab, except if you are facing issues.

If needed, network extension can be recreated, with same settings (especially the network prefix), and the route recreated to roll back a change.

To recreate the network extension, refer to the settings of Task 12.

If you need to recreate the static route on NSX-T, specify the following settings:

OptionValue
NameNested-SDDC-Lab-X-Y
Network10.X.1Y.128/27
Next hop / IP address10.X.Y.8
Next hop / Admin Distance1
Next hop / ScopeLeave empty

After the route re-creation, the connectivity via On Premises routing device should be restored to reach your workloads on the extended segment. You can roll back VM to On Premises too if needed.