Migrate a SQL Server standalone instance to Azure VMware Solution
In this article, learn how to migrate a SQL Server standalone instance to Azure VMware Solution.
VMware HCX offers two migration profiles when migrating a SQL Server standalone instance to Azure VMware Solution:
- HCX vMotion
- HCX Cold Migration
In both cases, consider the size and criticality of the database being migrated. For this how-to procedure, we validated VMware HCX vMotion. VMware HCX Cold Migration is also valid, but it requires a longer downtime period.
This scenario was validated using the following editions and configurations:
- Microsoft SQL Server (2019 and 2022)
- Windows Server (2019 and 2022) Data Center edition
- Windows Server and SQL Server were configured following best practices and recommendations from Microsoft and VMware.
- The on-premises source infrastructure was VMware vSphere 7.0 Update 3 and VMware vSAN running on Dell PowerEdge servers and Intel Optane P4800X SSD NVMe devices.
Tested configurations
This scenario was validated using the following editions and configurations:
- Microsoft SQL Server (2019 and 2022)
- Windows Server (2019 and 2022) Data Center edition
- Windows Server and SQL Server were configured following best practices and recommendations from Microsoft and VMware.
- The on-premises source infrastructure was VMware vSphere 7.0 Update 3 and VMware vSAN running on Dell PowerEdge servers and Intel Optane P4800X SSD NVMe devices.+
Prerequisites
Review and record the storage and network configuration of every node in the cluster.
Maintain backups of all the databases.
Back up the virtual machine running the SQL Server instance.
Remove all cluster node VMs from any Distributed Resource Scheduler (DRS) groups and rules.
Configure VMware HCX between your on-premises datacenter and the Azure VMware Solution private cloud that runs the migrated workloads. For more information about configuring VMware HCX, see Azure VMware Solution documentation.
Ensure that all the network segments in use by the SQL Server and workloads using it are extended into your Azure VMware Solution private cloud. To verify this step in the process, see Configure VMware HCX network extension.
Either VMware HCX over VPN or ExpressRoute connectivity can be used as the networking configuration for the migration.
VMware HCX over VPN, due to its limited bandwidth, is typically suited for workloads that can sustain longer periods of downtime (such as nonproduction environments).
For any of the following scenarios, ExpressRoute connectivity is recommended for a migration:
- Production environments
- Workloads with large database sizes
- Scenarios in which there's a need to minimize downtime the ExpressRoute connectivity is recommended for the migration.migration.
- Production environments
- Workloads with large database sizes
- Any case where there's a need to minimize downtime
Further downtime considerations are discussed in the next section.
Downtime considerations
Downtime during a migration depends on the size of the database to be migrated and the speed of the private network connection to Azure cloud. Migration of a SQL Server standalone instance using the VMware HCX vMotion mechanism is intended to minimize the solution downtime, however we still recommend the migration take place during off-peak hours within a preapproved change window.
The following table indicates the estimated downtime for migration of each SQL Server topology.
Scenario | Downtime expected | Notes |
---|---|---|
SQL Server standalone instance | Low | Migration is done using VMware vMotion, the database is available during migration time, but it isn't recommended to commit any critical data during it. |
SQL Server Always On Availability Group | Low | The primary replica will always be available during the migration of the first secondary replica and the secondary replica will become the primary after the initial failover to Azure. |
SQL Server Always On Failover Cluster Instance | High | All nodes of the cluster are shut down and migrated using VMware HCX Cold Migration. Downtime duration depends upon database size and private network speed to Azure cloud. |
Executing the migration
Log into your on-premises vCenter Server and access the VMware HCX plugin.
Under Services, select Migration > Migrate.
- Select the SQL Server virtual machine.
- Set the vSphere cluster in the remote private cloud, which hosts the migrated SQL Server VM or VMs as the Compute Container.
- Select the vSAN Datastore as remote storage.
- Select a folder. It isn't mandatory, but we recommend separating the different workloads in your Azure VMware Solution private cloud.
- Keep Same format as source.
- Select vMotion as Migration profile.
- In Extended Options select Migrate Custom Attributes.
- Verify that on-premises network segments have the correct remote stretched segment in Azure VMware Solution.
- Select Validate and ensure that all checks are completed with pass status.
- Select Go to start the migration.
After the migration is complete, access the virtual machine using VMware Remote Console in the vSphere Client.
Verify the network configuration and check connectivity both with on-premises and Azure VMware Solution resources.
Verify your SQL Server and databases are up and accessible. For example, using SQL Server Management Studio, verify you can access the database.
Check the connectivity to SQL Server from other systems and applications in your infrastructure. Verify that all applications using the database or databases can still access them.
More information
- Enable SQL Azure Hybrid Benefit for Azure VMware Solution.
- Create a placement policy in Azure VMware Solution
- Windows Server Failover Clustering Documentation
- Microsoft SQL Server 2019 Documentation
- Microsoft SQL Server 2022 Documentation
- Windows Server Technical Documentation
- Planning Highly Available, Mission Critical SQL Server Deployments with VMware vSphere
- VMware KB 100 2951 – Tips for configuring Microsoft SQL Server in a virtual machine
- Microsoft SQL Server 2019 in VMware vSphere 7.0 Performance Study
- Architecting Microsoft SQL Server on VMware vSphere – Best Practices Guide
- Setup for Windows Server Failover Cluster in VMware vSphere 7.0