Muokkaa

Jaa


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.

Diagram showing the architecture of Standalone SQL Server for  Azure VMware Solution.

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

  1. Log into your on-premises vCenter Server and access the VMware HCX plugin.

  2. Under Services, select Migration > Migrate.

    1. Select the SQL Server virtual machine.
    2. Set the vSphere cluster in the remote private cloud, which hosts the migrated SQL Server VM or VMs as the Compute Container.
    3. Select the vSAN Datastore as remote storage.
    4. Select a folder. It isn't mandatory, but we recommend separating the different workloads in your Azure VMware Solution private cloud.
    5. Keep Same format as source.
    6. Select vMotion as Migration profile.
    7. In Extended Options select Migrate Custom Attributes.
    8. Verify that on-premises network segments have the correct remote stretched segment in Azure VMware Solution.
    9. Select Validate and ensure that all checks are completed with pass status.
    10. Select Go to start the migration.
  3. After the migration is complete, access the virtual machine using VMware Remote Console in the vSphere Client.

  4. Verify the network configuration and check connectivity both with on-premises and Azure VMware Solution resources.

  5. Verify your SQL Server and databases are up and accessible. For example, using SQL Server Management Studio, verify you can access the database.

    Diagram showing a SQL Server Management Studio connection to the migrated 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