VMware Cloud Expert

L08 - SDDC Migration with HCX (Part 2)

Updated on

Introduction

VMware Cloud on AWS provides a reliable, elastic, and highly scalable solution for customers who want to extend their workloads into the cloud.

However, when it comes to migration or bi-directional workload mobility, software and network incompatibilities between on-premises and cloud environments can complicate your migration process.

VMware Hybrid Cloud Extension (HCX) helps overcome those challenges by building an abstraction layer on top of existing site-specific implementations, allowing you to extend their networks and environments to the cloud seamlessly without the need for extensive reconfiguration and upgrades.

Here are some key benefits of HCX:

  • Ability to migrate workloads across different versions of vSphere (5.0 or later).
  • WAN optimization, compression, and de-duplication enable high throughput for faster migrations.
  • Network extension enables stretching layer 2 networks between on-premises and VMware Cloud on AWS without the need for complex network reconfiguration. Virtual machines (VM) can be moved between on-premises and cloud environments with no need the change or re-assign IP addresses.

HCX is a software-as-a-service (SaaS) offering, available at no extra cost for VMware Cloud on AWS customers.

The HCX solution is built out of several component services, each supporting a specific function within the overall solution.

  • HCX Enterprise Manager: System management component on the on-premises side, which is always deployed as “source.”
  • HCX Cloud Manager: System management component on the cloud side and is always deployed as “destination.”
  • HCX-IX Interconnect Appliance: Provides replication and vMotion-based migration capabilities.
  • HCX WAN Optimization Service: Provides improved network performance by using techniques such as de-duplication and compression to help speed up migrations.
  • HCX Network Extension Service: Provides layer 2 extension capabilities, enabling VMs to migrate between on-premises and cloud without the need to re-IP.

HCX Use Cases

Older vSphere Versions

HCX allows migrating VMs from older versions of vSphere (6.0 or later) to VMware Cloud on AWS. Hosts in VMware Cloud on AWS are automatically patched, updated, and are thus likely to be running the latest (or near) version of vSphere software. This eliminates the need for customers to perform time-consuming system upgrades in order to prepare for migrations.

Bulk Migrations

In certain situations, customers may want to migrate workloads out of their current data centers in a “lift-and-shift” manner. An example of this is if you have an upcoming lease expiration on the hardware or data center facility. In this situation, when there’s not enough time for migration planning and execution, HCX can help customers migrate thousands of VMs simultaneously with no downtime. HCX, with WAN optimization services, can provide a high throughput connection over which on-premises networks can be extended into the cloud.

Heterogeneous Network Environments

Typically, your current on-premises network environment is one of the most important considerations in the migration planning process. Whether you have VXLANs, NSX for vSphere, NSX-T, or No NSX at all, each of these factors can complicate your migration plan. The good news is that HCX works by abstracting out the underlying network implementation, extending your networks from on-premises to the cloud seamlessly without the need for complex and time-consuming network re-architecture.

Slow/Sub Optimal Network Connectivity

A live vMotion across WAN with vSphere is sensitive to network bandwidth. Typically, a connection speed greater than 250 Mbps is required, but with its advanced WAN optimization capabilities, HCX can migrate live VMs over much slower connection speeds of around 100 Mbps per migration.

In this lab, we will walk through the deployment of HCX, site pairing, Service Mesh configuration Plus migration, and Network extension.

TASKS

Task 1 - Network Extension and Migration with HCX

While the Service mesh is deployed, we’ll move our attention to readying the Planespotter app for Migration. This app includes 4 Virtual machines on the 172.16.10.0/24 Network segment All of the VMs are connected to the Planespotter-seg NSX-T Overlay segment. The segment is currently not connected to the Shinobi-T1 Gateway. As the 3-Tier app web-seg also uses the 172.16.10.0/24 segment.

We will begin by disconnecting web-seg from Shinobi-T1 and then we’ll connect Planespotter-seg to Shinobi-T1.

NOTE: This may not be a step you perform before an actual migration. We have to do this because our lab environment has 2 segments with the same network address and we can’t connect both segments to the same T1 gateway at the same time.

Task 1.1 - Connect PlaneSpotter Seg to the T1 gateway

 

  1. In a new browser tab click the NSX-T Local Manager Browser bookmark in the VI Management Bookmark folder (proceed through warnings)
  2. Log into NSX-T Manager as:
    • admin
    • VMwareNinja1!   Note: You can also use ctrl+m to paste in the password

 

  1. Click the Networking Menu
  2. In the left pane click Connectivity > Segments
  3. In the right pane click the Segments tab
  4. Click the 3 vertical dots next to Web-seg
  5. Click Edit
  6. Click the dropdown for the Connected Gateway field
  7. Select None
  8. Scroll down, Click the blue Save button
  9. Click the gray Close Editing button
  10. Click the 3 vertical dots next to Planespotter-seg
  11. Click Edit
  12. Click the dropdown for the Connected Gateway field
  13. Select Shinobi-T1
  14. Scroll down, Click Save
  15. Click Close Editing
Task 1.1.1 - Test the Planespotter App
  1. Back in the browser tab for the vSphere Client take a look at the Service Mesh task and
    confirm all tasks were completed successful (you may need to refresh)
  1. Switch to the Hosts and Clusters view in the vSphere Client and expand the Shotoku Compute01 Cluster.
    You will notice 3 additional On-Prem to __ VMs as part of the service mesh.
  2. You'll also notice a new ESXi Host (192.168.110.151)

NOTE: If the Mobility Agent (ESXi host - 192.168.110.15x) is missing or if any of Service Mesh VMs (On-Prem.....IX, On-Prem....NE, On-Prem...WO) You'll need to return to the service mesh and either resynch it, or delete and recreate before proceeding. Please check with your instructor for assistance, if needed.

  1. Power-on the PlaneSpotter vApp, if it is currently Off

 

  1. Once Powered-on launch a new Browser tab and try accessing the planespotter app by clicking the planespotter bookmark link
  2. Click the App Health button
  3. The App Health should report successful connectivity for the
    • App server
    • DB Server
    • Redis Server
    • The positioning and picture servers require a subscription, so they’ll report a failure
  4. in vSphere expand the Planespotter vApp and power-off the Planespotter MySQL VM
  5. Repeat step 6 to confirm the application health
  6. Power the Planespotter - MySQL VM back on and click Yes to warnings

Task 1.2 - Create an HCX Network Extension

VMware HCX Network Extension (HCX-NE), is a High-Performance (4–6 Gbps) service, you can use to extend your Virtual Machine networks to a VMware HCX-enabled remote site, such as a VMC on AWS SDDC. Virtual Machines that are migrated or created on the extended segment at the remote site are Layer 2 adjacent to virtual machines placed on the origin network. Using Network Extension a remote site's resources can be quickly consumed.

Using VMware HCX Network Extension with VMware HCX Migration you can:

  • Retain the IP and MAC addresses of the Virtual Machine and honor the existing network policies.
  • Extend VLAN networks from a VMware vSphere Distributed Switch.
  • Extend NSX overlay networks.

VMware HCX deploys the Remote Site HCX-NE appliance automatically whenever a local appliance is deployed.

 

  1. In the vSphere Client browser tab Click Menu > HCX
  2. In the left pane under Services Click Network Extension 
  3. Click the blue Create a Network Extension button

 

  1. Check the Planespotter-seg
  2. Click Next
  3. Click the Checkbox to enable Mobility Optimized Networking (MON)
  4. NOTESelecting MON will connect the newly created Extended Segment in the SDDC to the Compute Gateway allowing VMs Migrated from On-Premises to Use the local Compute Gateway as their Gateway
  5. In the Gateway IP address field type 172.16.10.1/24
  6. Click Submit

 

  1. Monitor the Status of the Network Extension Creation. You may need to click the refresh button to see the progress update
    NOTE: This can take up to 2 to 3 minutes to complete. For the 1st 30 - 60 seconds it seems like nothing is happening, just give it time., and you'll see the screen refresh and start to provide a status update.

Task 1.3 - Migrate the Web-Tier of the PlaneSpotter Application

Planespotter is composed of a MySQL DB that holds Aircraft registration data from the FAA. You can search through the data in the DB through an API App Server written in Python using Flask. The API App Server is also retrieving data from a Redis in-memory cache that contains data from aircraft that are currently airborne. There's a service written in Python that retrieves the Data about airborne aircraft and pushes that data into Redis. Finally, there is a frontend web server written with Python Flask and using Bootstrap.

All of the Planespotter VMs are deployed onto a common network segment and share a common private IP subnet (172.16.10.0/24). We will migrate the DB Server onto your VMC on AWS SDDC leaving behind the App, Redis & Web server On-Premises. We'll then test the functionality of the migration and Network extension.

VMware HCX Replication Assisted vMotion (RAV) uses the HCX Interconnect appliance along with replication and vMotion technologies to provide large scale, parallel migrations with zero downtime when target and source destinations are Intel enabled hypervisors.

 

 

  1. In the HCX Page under Services Click Migration
  2. On the right pane click the Migrate button
  1. Select the Planespotter MySQL VM
  2. Click the green Add button

 

  1. On the next screen Select the following options from the drop downs
    • Group Name - vmcexpert#-xx Planespotter Migration (Where # is the Environment ID and xx is your student number)
    • Destination Compute Container:Compute-ResourcePool
    • Destination Folder:Workloads
    • Destination Storage:WorkloadDatastore
    • Virtual Disk Format:Thin Provision
    • Migration Profile:vMotion
    • Select the PlaneSpotter MySQL VM
  2. Click GO
  3. Validation will occur. Then click Close
  1. Once the VM begins to Migrate try accessing the Planespotter App from the Chrome browse bookmark
  2. View the App Health Page to confirm the Database is still accessible during the migration
    Note: The migration takes up to 5 mins to reflect a status and another 10-15 mins to complete the migration.

Task 1.4 - Confirm Migration

At this time, you should have the MySQL server of the Planespotter App in VMC, with the Web, App, and Redis are On-Premises, we will confirm this and then test access and functionality of the application.

When you review the On-Premises vSphere inventory, you’ll notice the MySQL server for the Planspotter app is no longer there. Review the VMC SDDC inventory, and you’ll find it. HCX successfully configured the L2 stretch between the sites and completed a vMotion Migration of the Web server.

  1. In Google Chrome Click the VCGW UI Browser Bookmark under Management
  2. Log into the Cloud Gateway (https://vcgw-l-01a.vcn.ninja.local/ui) as:
    • [email protected]
    • VMwareNinja1!   Note: You can also use ctrl+m to paste in the password
      NOTE: If you are unable to access the vCenter Cloud Gateway then just log into the 2 vCenters independently.
  3. Expand the On-Premises vCenter, Click the Hosts and Cluster view
  4. Inspect the inventory, you'll notice the Planespotter MySQL is no longer there
  5. Expand the VMC SDDC vCenter
  6. You'll notice the Planespotter MySQL VM has been migrated there and connected to a Newly Created Segment
  7. Try accessing the Planespotter App from the Chrome browse bookmark
  8. View the App Health Page to confirm the Database is still accessible after the migration
    NOTE: You may need to refresh the browser to clear the cache
Task 2 - Replication Assisted vMotion

VMware HCX Replication Assisted vMotion (RAV) uses the HCX Interconnect appliance 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 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.

 

  1. Navigate back to the vSphere console and get into the HCX menu
  2. Under Services Click Network Extension
  3. On the right Pane click + Extend Network
  4. Select vm-seg
  5. Click Next
  6. Check the Checkbox to enable Mobility Optimized Networking (MON)
  7. In the Gateway IP address field type 172.16.101.1/24
  8. Click Submit
  9. Monitor the Status of the Network Extension Creation
    NOTE: This can take up to 2 to 3 minutes to complete, Wait for this step to complete before moving on

 

  1. Under Services Click Migration
  2. Click Migrate
  3. Name the Group vmcexpert#-xx Wordpress RAV
  4. Select the Wordpress VM
  5. Click Add

 

  1. Select the following options
    • Destination Compute Container:Compute-ResourcePool
    • Destination Folder:Workloads
    • Destination Storage:WorkloadDatastore
    • Virtual Disk Format:Thin Provision
    • Migration Profile:Replication-assisted vMotion
    • Switchover: Select a start time 1+ hours later than the default time and an end time 1 hour later than the start time. Then click Apply
    • Select the Wordpress VM
  2. Click Save then  GO and check validations
  3. Click Close

Monitor the progress, You'll notice the migration actually begins but the switch over won't occur before the window specified. This allows you to define your migration activities, kick off the migration of the VM images using replication, and finalize the actual switchover at the most appropriate time as defined by you or corporate policies.

Conclusion

HCX is included with VMware Cloud on AWS subscription.  HCX is an application mobility platform that is designed for simplifying application migration, workload rebalancing, and business continuity across data centers and clouds.

VMware HCX enables:

  • Application migration to VMC on AWS
  • You can schedule and migrate thousands of vSphere virtual machines from your data center(s) to VMC on AWS without requiring a reboot.
  • Change platforms or upgrade vSphere versions
  • Workload rebalancing
  • Workload rebalancing provides a mobility platform across cloud regions and cloud providers to allow customers to move applications and workloads at any time to meet the scale, cost management, compliance, and vendor neutrality goals.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.