Tutorial -- HCX Migration to Azure VMware Solution¶
Step-by-step tutorial: configure HCX site pairing, network profiles, compute profiles, service mesh, and perform live vMotion migration of VMs from on-premises VMware to AVS.
Prerequisites¶
Before starting this tutorial, ensure:
- AVS private cloud deployed and running (minimum 3 hosts)
- ExpressRoute or VPN connectivity between on-premises and Azure established
- On-premises vCenter Server 6.5 or later
- On-premises ESXi hosts 6.5 or later
- Network connectivity: TCP 443, 8443, 9443 between HCX appliances
- DNS resolution working between on-premises and AVS
- Azure CLI installed and authenticated
- Sufficient IP addresses for HCX appliances (management, uplink, vMotion networks)
Network port requirements¶
| Port | Protocol | Source | Destination | Purpose |
|---|---|---|---|---|
| 443 | TCP | HCX Connector | HCX Manager (AVS) | Management, API |
| 8443 | TCP | HCX Connector | HCX Manager (AVS) | Bulk migration |
| 4500 | UDP | HCX Connector | HCX Manager (AVS) | IPsec tunnel (IKE) |
| 500 | UDP | HCX Connector | HCX Manager (AVS) | IPsec tunnel (ISAKMP) |
| 9443 | TCP | HCX Connector | HCX Manager (AVS) | Appliance management |
Step 1: Enable HCX on AVS¶
1.1 Enable HCX add-on¶
# Enable HCX Enterprise on your AVS private cloud
az vmware addon hcx create \
--private-cloud avs-prod-eastus2 \
--resource-group rg-avs-prod \
--offer VMware-MaaS-Cloud
# Verify HCX status
az vmware addon hcx show \
--private-cloud avs-prod-eastus2 \
--resource-group rg-avs-prod \
--query "provisioningState"
1.2 Get HCX Manager URL and activation key¶
# Get HCX Cloud Manager URL
az vmware private-cloud show \
--name avs-prod-eastus2 \
--resource-group rg-avs-prod \
--query "endpoints.hcxCloudManager"
# Generate activation key for on-premises connector
az vmware hcx-enterprise-site create \
--name onprem-datacenter-1 \
--private-cloud avs-prod-eastus2 \
--resource-group rg-avs-prod
Save the HCX Manager URL and activation key for use in Step 2.
Step 2: Deploy HCX Connector on-premises¶
2.1 Download the HCX Connector OVA¶
- Navigate to the Azure Portal > AVS private cloud > Manage > Add-ons > HCX
- Copy the HCX Cloud Manager URL
- Open the HCX Cloud Manager URL in a browser
- Log in with the cloudadmin credentials
- Navigate to System Updates > Download the HCX Connector OVA
2.2 Deploy the OVA in on-premises vCenter¶
- In vSphere Client, select File > Deploy OVF Template
- Select the downloaded HCX Connector OVA
- Configure deployment settings:
- Name:
hcx-connector-01 - Folder: choose an appropriate folder
- Cluster/host: select a cluster with sufficient resources
- Datastore: select a datastore with at least 35 GB free
- Name:
- Configure network settings:
- Management network: your management VLAN/port group
- IP address: assign a static IP from your management subnet
- Subnet mask, gateway, DNS: configure per your environment
2.3 Activate the HCX Connector¶
- Open the HCX Connector management interface:
https://<hcx-connector-ip>:9443 - Enter the activation key from Step 1.2
- Enter the HCX Cloud Manager URL
- Wait for activation to complete (2--5 minutes)
2.4 Configure HCX Connector¶
- Connect to vCenter: enter your on-premises vCenter URL and credentials
- Configure SSO: connect to your identity source (AD/LDAP or vSphere SSO)
- Configure location: set the geographic location for the connector
Step 3: Create site pairing¶
3.1 Initiate site pairing¶
- In the HCX Connector UI, navigate to Infrastructure > Interconnect > Site Pairing
- Click Add Site Pairing
- Enter the AVS HCX Cloud Manager URL
- Enter credentials:
cloudadmin@vsphere.localand the AVS cloudadmin password - Accept the remote site certificate
- Click Connect
3.2 Verify site pairing¶
After pairing, verify the connection status shows Connected. The site pairing establishes the management plane connection between your on-premises HCX and AVS HCX.
Step 4: Create network profiles¶
Network profiles define the IP pools that HCX appliances use for communication.
4.1 Management network profile¶
Profile name: management-profile
Network: Management port group / VLAN
IP Pool: 10.10.1.100 -- 10.10.1.110 (10 IPs)
Subnet: 255.255.255.0
Gateway: 10.10.1.1
DNS: 10.10.1.5
4.2 Uplink network profile¶
Profile name: uplink-profile
Network: Uplink port group (routable to Azure)
IP Pool: 10.10.2.100 -- 10.10.2.110 (10 IPs)
Subnet: 255.255.255.0
Gateway: 10.10.2.1
4.3 vMotion network profile¶
Profile name: vmotion-profile
Network: vMotion port group
IP Pool: 10.10.3.100 -- 10.10.3.110 (10 IPs)
Subnet: 255.255.255.0
Gateway: 10.10.3.1 (or no gateway if vMotion is non-routed)
4.4 Replication network profile (optional)¶
Profile name: replication-profile
Network: Replication port group (can share with vMotion)
IP Pool: 10.10.4.100 -- 10.10.4.110 (10 IPs)
Subnet: 255.255.255.0
Gateway: 10.10.4.1
IP pool sizing
Each HCX service mesh deployment consumes 4--6 IPs from each network profile. If you plan to create multiple service meshes, size your IP pools accordingly.
Step 5: Create compute profile¶
The compute profile defines which on-premises resources HCX can use for migration.
- Navigate to Infrastructure > Interconnect > Compute Profiles
- Click Create Compute Profile
- Configure:
- Name:
compute-profile-prod - Select services: Migration and Network Extension (and optionally DR, WANopt)
- Select resources: choose on-premises cluster(s) and datastore(s)
- Select network profiles: assign the profiles created in Step 4
- Management: management-profile
- Uplink: uplink-profile
- vMotion: vmotion-profile
- Replication: replication-profile (or vmotion-profile)
- Name:
Step 6: Create service mesh¶
The service mesh deploys HCX appliances (IX, NE, WAN optimization) that create the connectivity infrastructure between sites.
- Navigate to Infrastructure > Interconnect > Service Mesh
- Click Create Service Mesh
- Select the source site (on-premises) and destination site (AVS)
- Select the source compute profile (from Step 5)
- Select the destination compute profile (auto-configured by AVS)
- Select services to deploy:
- Interconnect (required): secure tunnel between sites
- Network Extension (recommended): L2 stretch for same-subnet migration
- WAN Optimization (optional): acceleration for high-latency links
- Review and deploy
Service mesh deployment time
Service mesh deployment takes 15--30 minutes. The IX and NE appliances are deployed as VMs on both the source and destination clusters. Do not interrupt the deployment.
Verify service mesh health¶
After deployment, verify all appliances show green status:
- Tunnel Status: Up
- IX Appliance: Connected
- NE Appliance: Connected (if deployed)
Step 7: Extend networks (optional but recommended)¶
Network extension allows you to stretch Layer 2 networks from on-premises to AVS, so VMs keep their IP addresses during migration.
- Navigate to Network Extension
- Select the service mesh created in Step 6
- Select the on-premises port group(s) to extend
- Assign the destination gateway (AVS Tier-1 gateway)
- Click Extend
When to skip network extension
If you plan to re-IP VMs after migration (change their IP addresses), you can skip network extension and perform a standard L3 migration. This is cleaner for long-term operations but requires DNS and application configuration updates.
Step 8: Migrate VMs¶
8.1 vMotion migration (zero downtime)¶
- Navigate to Migration > Migrate
- Select source vCenter and VMs to migrate
- Select migration type: vMotion
- Select destination:
- Cluster: AVS cluster
- Datastore: vSAN datastore
- Folder: target folder
- Resource pool: target resource pool
- Configure network mapping (source port group to destination segment)
- Click Validate to check prerequisites
- Click Go to start migration
Monitor progress in the HCX dashboard. vMotion migration typically takes 5--30 minutes per VM depending on memory size and change rate.
8.2 Bulk migration (parallel with reboot)¶
- Navigate to Migration > Migrate
- Select VMs to migrate (select multiple)
- Select migration type: Bulk Migration
- Configure:
- Schedule: immediate or scheduled date/time
- Switchover window: when to perform the final reboot
- Retain MAC: keep or change MAC addresses
- Click Go to start replication
Bulk migration replicates VMs in the background. At the scheduled switchover time, VMs are rebooted on the destination.
8.3 RAV migration (bulk replication + vMotion cutover)¶
- Navigate to Migration > Migrate
- Select VMs to migrate
- Select migration type: Replication Assisted vMotion (RAV)
- Configure destination and network mapping
- Click Go to start replication phase
- When replication is complete, trigger vMotion cutover
RAV is the recommended method for large-scale migrations requiring zero downtime at cutover.
Step 9: Validate migrated VMs¶
After migration, validate each VM on AVS:
# Verify VM is running on AVS (via PowerCLI)
Connect-VIServer -Server avs-vcenter-url -User cloudadmin@vsphere.local
Get-VM -Name "migrated-vm-01" | Select-Object Name, PowerState, VMHost, NumCpu, MemoryGB
# Check VM network connectivity
Test-Connection -ComputerName migrated-vm-01 -Count 4
# Verify DNS resolution
Resolve-DnsName migrated-vm-01.contoso.com
Post-migration checklist¶
- VM powered on and responsive
- Application health checks pass
- Network connectivity to dependent services verified
- Storage performance meets expectations
- Monitoring (Azure Monitor) receiving data
- Backup (Azure Backup) configured
- DNS records updated (if IP changed)
Step 10: Cleanup¶
After all VMs are migrated and validated:
- Un-extend networks: remove L2 extensions (HCX > Network Extension > Un-extend)
- Remove service mesh: decommission HCX appliances
- Remove site pairing: disconnect on-premises from AVS
- Decommission on-prem HCX Connector: power off and delete the VM
- Decommission on-prem VMware: after the soak period, power off ESXi hosts
Wait for soak period
Maintain the on-premises environment for 30--60 days after migration as a rollback option. Only decommission after confirming all applications are stable on AVS.
Troubleshooting¶
| Issue | Cause | Resolution |
|---|---|---|
| Site pairing fails | Network connectivity / firewall | Verify ports 443, 8443, 9443 are open between sites |
| Service mesh deployment hangs | Resource constraints on source/destination | Verify sufficient CPU/memory/storage for HCX appliances |
| vMotion migration slow | WAN bandwidth limitation | Consider RAV for bulk replication + vMotion cutover |
| L2 extension fails | MTU mismatch or VLAN trunking | Verify MTU >= 1500 and VLAN is trunked to HCX appliances |
| Bulk migration reboot times out | VM guest OS slow to boot | Increase the switchover timeout or check guest OS health |
Related¶
Last updated: 2026-04-30 Maintainers: CSA-in-a-Box core team