Moving an existing RDM to a different virtual machine
search cancel

Moving an existing RDM to a different virtual machine

book

Article ID: 342552

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This document provides steps to migrate an existing RDM from one virtual machine to another.

Resolution

To migrate an RDM to a new Virtual machine:
  1. Shut down the guest virtual machine where the RDM is currently attached.
     
  2. Remove the RDM from the virtual machine:
    1. Click Edit Settings
    2. Select the RDM hard disk
    3. Click Remove. Select Delete from disk if it is not already selected
    4. Click OK.
    Note: This destroys the mapping file, but not the LUN content.
     
  3. Present LUN to the new virtual machine as an RDM using this procedure:
    1. On the Select a Disk page of the New Virtual Machine wizard (or the Add Disk page of the Edit Settings wizard), select Raw Device Mapping and click Next.
    2. From the list of SAN disks or LUNs, select a LUN for your virtual machine to access directly and click Next.
    3. Select a datastore for the LUN mapping file and click Next.
      Note: You can place the RDM file on the same datastore where your virtual machine configuration file resides, or select a different datastore.
    4. Select the appropriate compatibility mode and click Next.
    5. Accept the default virtual device node.
    6. Click Next. Your changes are recorded.
    7. The Ready to Complete page opens. Click Finish.

For a more detailed procedure, see Add an RDM Disk to a Virtual Machine in the vSphere Client in Creating a Virtual Machine in the vSphere Client.

 

 

Additional Information

How to remove a Hard disk or RDM from a powered on virtual machine

Below is an alternative option should you wish to retain the same old RDM pointer files.

1)The first step is to document the scsi controller nodes related to each vmdk (eg scsi 0:1 -> Old-VM.vmdk) along with the controller sharing configuration where applicable.

2) Power Down the Old-VM

3) Detach the RDMS and any shared disks that are needed for the rest of the cluster from Old-VM

4) Storage migrate the Old-VM to another datastore to separate it from the vmdk pointer files which you wish to retain. (Important to ensure disks are detached as per step 3 first)

5) Attach the disks Old-VMs RDM pointer files to the NEW-VM as per your documentation in step 1.

6) Power on NEW-VM and verify VM is functional.

7) Once the original Old-VM vm has had its RDMS disks detached and the vm has been isolated to another datastore you can then confirm and remove this vm.


All the clustered vms including the NEW-VM will still point to the original Old-VM's folder and disks on the original folder and datastore.


The Old-VM vm config and its files (except required RDMS/vmdks) should have been migrated to another location before removal.