When migrating your VMware environment to a new SAN or storage provider, edge cases often require special attention. One such case involves virtual machines with Raw Device Mapped (RDM) LUNs. This is usually done for VMs that require more storage than a typical vmware datastore can manage or, more typically, when Microsoft Cluster Services are needed to provide fault tolerance for an application, usually SQL Server.

This post walks through the steps required to migrate a two node SQL server cluster to new RDM storage on a different SAN.

The first step is to make full backups of the SQL data and the server in case a restore is needed. This example migration uses PRODSQL-01 as the primary SQL node and PRODSQL-02 as the secondary SQL node

Gracefully shutdown SQL

Open Cluster manager and Pause ⭢ Drain Roles on PRODSQL-02.

Migrating a VMware MS SQL Cluster with RDM Disks

Migrating a VMware MS SQL Cluster with RDM Disks
Click Roles ⭢ Choose SQL Server and right click and choose Stop Role.

Migrating a VMware MS SQL Cluster with RDM Disks

At this point, all cluster disks should still be online and connected to PRODSQL-01. This is required for VMware standalone converter to capture the disks.

Start VMware Converter

Run VMware Converter as admin and click Convert Machine. In this case, converter is being run from the local machine being migrated, PRODSQL-01.

Migrating a VMware MS SQL Cluster with RDM Disks

Enter the vCenter server and credentials.

Migrating a VMware MS SQL Cluster with RDM Disks

Enter the name for the destination VM and choose the folder in VMware to place it.
Migrating a VMware MS SQL Cluster with RDM Disks
Choose the datastore to place the VM.
Migrating a VMware MS SQL Cluster with RDM Disks
Under options, click Edit in the ‘Data to copy’ section, click Advanced, and under Destination Disks, choose ‘Thin’ for all the disks.

Migrating a VMware MS SQL Cluster with RDM Disks

Under ‘Networks’, click Edit and choose ‘VMXNET 3’ under the controller type.

Migrating a VMware MS SQL Cluster with RDM Disks

Under ‘Advanced options’, click Edit. Be sure ‘Perform final synchronization’ and ‘Synchronize changes’ are checked, along with ‘Run synchronization after cloning’.

Migrating a VMware MS SQL Cluster with RDM Disks

The Default options for Post-conversion are sufficient.

Migrating a VMware MS SQL Cluster with RDM Disks
Click Next and then click Finish to start the clone process. Repeat this process for PRODSQL-02. This should run much more quickly due to the cluster disks not being attached. When both are complete, shutdown the existing SQL cluster servers.

Configure the newly created VMs

Under Storage Devices on any ESXi host that has the attached RDM LUN, take note of the Identifier.

Migrating a VMware MS SQL Cluster with RDM Disks

Edit the settings for the cloned PRODSQL-01 and remove (but do not delete) the former RDM disks that have now been converted to VMDK files.

Migrating a VMware MS SQL Cluster with RDM Disks

Open an SSH session to an ESXi host and navigate to the folder containing the PRODSQL-01 VM.

Migrating a VMware MS SQL Cluster with RDM Disks

Create a folder and move the converted VMDK files to that folder to avoid conflict with the RDM VMDKs that will be created in the next step.

Migrating a VMware MS SQL Cluster with RDM Disks

Next, use vmkfstools to create the RDM VMDK files from the converted VMDK files:

Migrating a VMware MS SQL Cluster with RDM Disks
Migrating a VMware MS SQL Cluster with RDM Disks

Once the VMDK files are cloned, edit the settings on PRODSQL-01 and PRDOSQL-02 and add the SCSI controllers. For SQL clusters, VMware recommends adding more than one controller and adding disks to different controllers to better distribute the I/O.

Migrating a VMware MS SQL Cluster with RDM Disks

Change the SCSI controller type to ‘VMware Paravirtual’, then change the SCSI Bus Sharing to ‘Physical’ and click OK. With this setting, SQL cluster nodes can be located on any host. ‘Virtual’ restricts SQL cluster nodes to the same host.
Migrating a VMware MS SQL Cluster with RDM Disks

Once both VMs have new SCSI controllers added, click Edit -> Add New Device -> Add Existing Disk. Then browse to the folder where the newly created RDM VMDK files are located and select a VMDK file.
Migrating a VMware MS SQL Cluster with RDM Disks
Once added, set the ‘Virtual Device Node’ to the various VMware Paravirtual controllers that were added in a prior step.

Migrating a VMware MS SQL Cluster with RDM Disks

Optional (Remove old missing network adapter)

Power-on the two nodes and on each, open a command prompt with admin privileges and type:

Migrating a VMware MS SQL Cluster with RDM Disks
Migrating a VMware MS SQL Cluster with RDM Disks

In Device Manager, click View ⭢ Show hidden devices.

Migrating a VMware MS SQL Cluster with RDM Disks

Select the missing adapter and click Uninstall.

Migrating a VMware MS SQL Cluster with RDM Disks

Click OK to delete the device.

Migrating a VMware MS SQL Cluster with RDM Disks

Bring the cluster online

Open the Network Adapter properties and re-ip the Ethernet0 to match the old IP of the server.

Migrating a VMware MS SQL Cluster with RDM Disks

Once both servers are given a correct IP, open Cluster Manager and verify both nodes are up.

Migrating a VMware MS SQL Cluster with RDM Disks

Verify all cluster disks are up.

Migrating a VMware MS SQL Cluster with RDM Disks

Start the SQL Server cluster role.

Migrating a VMware MS SQL Cluster with RDM Disks

Once everything is up, test failover by changing ownership of the disk.

Migrating a VMware MS SQL Cluster with RDM Disks

Test SQL failover by moving the SQL Role.

Migrating a VMware MS SQL Cluster with RDM Disks

Finally, bring up applications that connect to the SQL cluster and begin application testing.

That’s it! If your organization has any additional questions about Migrating a VMware MS SQL Cluster with RDM Disks or any other aspects of migrating your VMware environment, including any edge case situations, please don’t hesitate to reach out to us. We’d love to help you out.