Migrating virtual machines with Raw Device Mappings (RDMs) from one vSphere Cluster to another
search cancel

Migrating virtual machines with Raw Device Mappings (RDMs) from one vSphere Cluster to another

book

Article ID: 399511

calendar_today

Updated On: 06-01-2025

Products

VMware vSphere ESXi

Issue/Introduction

This article explains the steps that need to be taken to migrate VMs from one vSphere Cluster to another.

The two clusters do not share the same datastores, but the RDM LUNs are visible to hosts on both clusters.

Environment

VMware vSphere ESXi 7.x

Resolution

Note:

  • Down time needs to be scheduled for this activity.
  • It's fine if the LUN ID is different on the two separate clusters (source and destination), but it must be ensured that the LUN ID is consistent across all hosts in the target cluster.

Steps:

  1. Power OFF the two clustering VMs which share the RDMs.

  2. For the pRDMs (Physical RDMs), first make a note of each disk's "Virtual Device Node", LUN ID (naa.###) "Sharing" and "Compatibility Mode" from edit settings of the VM, this should be done for both the primary and secondary VMs. Example: "SCSI(2:0) Hard disk 3", "No sharing" and "Physical".

  3. On the secondary VM, go to Edit settings, select the RDM disk and then click on Remove.

  4. On the primary VM, go to Edit settings, select the RDM disk and then click on Remove and also select the "Delete from disk" check box. This will only delete the pointer file, the data remains on the LUN.

  5. Perform steps 3 & 4 for all the RDM disks for the 2 VMs.

  6. Click "Ok" to save the changes in edit settings.

  7. Now, once all the RDMs are detached from the VMs, proceed to migrate the VMs from source datacenter host and datastore to target datacenter host and datastore.

  8. Next, to add the RDMs back to the primary VM:

    1. Go to edit settings of the primary VM.

    2. Click on "Add disk" and select "Raw Device Mapping" and click "Next"

    3. From the list of LUNs, select the RDM LUN which was attached to the VM previously and click Next.

    4. Select the required datastore now, which will store the RDM pointer file and click Next.

    5. Select the appropriate compatibility mode, sharing and virtual device node for the RDM as noted in Step 2 and click Next.

    6. Click Finish to complete the add task.

    7. Perform the same for the remaining RDMs for primary VM.

  9. For the secondary VM:

    1. Go to edit settings of the VM.

    2. Click on "Add existing disk".

    3. Browse the datastore and select the pointer file, as made in Step 8.4.

    4. Select the appropriate compatibility mode, sharing and virtual device node for the RDM as noted in Step 2 and click Next.

    5. Click Finish to complete the add task.

    6. Perform the same for the remaining RDMs of secondary VM.

  10. The VMs can now be powered ON.

Additional Information