How to Migrate VMs with Raw Device Mappings [3 Ways]

RDM provides a VM with direct access to a physical storage device, so we need to figure out how to migrate VM with RDM. This article provides you three methods to migrate VM with RDM and also offers you a way to migrate RDM to another storage.

By @Amelia Last Updated September 6, 2024

What is RDM

RDM stands for Raw Device Mapping, is a specialized configuration in VMware environments that allows virtual machines to access storage devices directly, bypassing virtual disk files. In essence, RDM enables VMs to connect straight to physical storage without going through the virtualization layer.

β–Ά Note: RDM is an advanced feature that integrates directly with VM technology, providing flexibility for managing storage resources in a virtual environment.

How to Migrate VM with RDM[3 Ways]

When migrating virtual machines with Raw Device Mapping (RDM)disk, it’s important to carefully consider how to manage RDM to ensure data continuity and accessibility. Selecting the appropriate migration method and ensuring correct RDM handling is crucial for a smooth transition.

There are three methods you can choose to migrate VMware VMs with RDM: vMotion, cold migration and storage migration. These methods automatically handle RDM, ensuring that associated data is seamlessly migrated to the new location, allowing the VMs to function properly in the new environment.

Way 1: Migrate VM with RDM Using vMotion

vMotion allows a virtual machine to move from one physical host to another while remaining operational. During this process, the system manages the Raw Device Mapping (RDM) automatically, ensuring that the RDM stored data is seamlessly migrated to the new host. This ensures uninterrupted access to the RDM data for the VM throughout the migration.

Following are some steps you can follow:

Step 1: In the vCenter, locate the VM that need to be migrated and right-click the VM and then choose Migrate > Migrate to Another Host.

Step 2: Choose the host to which you want to migrate the VM. And then the system will perform a compatibility check to ensure the destination host meets the requirements.

Step 3: Click Finish to start the vMotion process. You can monitor the process through the Recent Tasks pane in the vSphere Client.

Way 2: Migrate VMware VM with RDM via Cold Migration

Cold migration is a process that moves a virtual machine from one physical host to another while the VM remains powered off during the entire transfer. When migrating a VM with Raw Device Mapping (RDM), cold migration seamlessly relocates it to a new host while preserving the RDM connectivity without any modification.

You can follow the steps to migrate:

Step 1: In vCenter, right-click the VM and select Shut Down Guest OS or Power Off.

Step 2: Right-click the powered-off VM and select Migrate Move to Another Datastore.

Step 3: Right-click the VM and open Migration Wizard and select the target host to follow the prompts.

Step 4: Click Finish to start the cold migration process.

πŸ“ŒTip: Since the VM is powered off, there is no impact on any workloads, but the time taken will depend on the size of the VM’s files and the network/storage bandwidth.

Way 3: Migrate VM to Anotehr via Storage vMotion

Storage vMotion enables the migration of a virtual machine’s storage from one storage device to another while the VM remains running, ensuring uninterrupted service.

Step 1: Right-click the VM and select Migrate Storage vMotion.

Step 2: Click Change storage only and click Next. Then you can select the format for the virtual machine’s disks.

Step 3: In the VM Storage Policy drop-down menu, you can select a virtual machine storage policy.

Step 4: After select the datastore location, you can review the details and click Finish on the Ready to complete page.

πŸ“ŒNote: Data from a virtual mode RDM can be converted to a VMDK disk using Storage vMotion by selecting the disk format in the Advanced View. This process can be completed whether the virtual machine is powered on or powered off.

Updated: How to Migrate RDM to Another Storage

Migrating RDM to another storage in a VMware environment requires careful handling to endure that the virtual machine continues to operate smoothly and data integrity is maintained. Below are steps for migrating RDM to another storage.

Step 1: Power off the guest virtual machine that currently has the RDM attached.

Step 2: Click Edit Setting > RDM hard disk, and click Remove, then select Delete files from datastore if it’s not to be selected. Then click OK.

Step 3: In the Select a Disk section of the New Virtual Machine wizard, choose Raw Device Mapping and click Next.

Step 4: From the list of available SAN disks or LUNs, select a LUN for your virtual machine to access directly, then click OK.

Step 5: Choose a datastore for the LUN mapping file and click Next. Select the appropriate compatibility mode and click Next, and keep the default virtual device node and click Next to save your changes. Then, on the Ready to Complete page, click Finish to finalize the process.

A Security Measure to Migrate VM Through Backup and Recovery

We need to take a backup of the VM before proceeding with the migration of the VM, otherwise the data can easily be lost. So here is an alternative to migration - backup and recovery - which ensures data security and is a cost-effective alternative to the paid-for features of migration.

AOMEI Cyber Backup is a great choice, it's a cost-effective, centralized VMware backup tool.

With this tool, it can offer you lots of benefits:

✍ User-friendly Backup: With intuitive interface, you can easily manipulate the software. ✍ Flexible Retention Policies: Users can define and manage retention policies tailored to their organization's needs. This flexibility helps optimize storage usage and ensures backups are kept for the appropriate length of time. ✍ Batch VM Backup: Perform batch backups of large numbers of VMs managed by vCenter Server or standalone ESXi hosts. ✍ Restore to New Location: Create a new VM directly from the backup in the same or a different datastore/host, eliminating the need to reconfigure the new VM. ✍ Centralized Management: You can manage all backups from a single interface.

You can click the following button to install the software to have the 30-day free trial.

Download Free Trial VMware and Hyper-V
Secure Download

4 Easy Steps to Backup VMware VMs before Migration

1. Bind Device: Navigate to Source Device and click VMware + Add VMware Device. And then enter device information and user information to Bind Device.

2. Create Backup Tasks: Choose Backup Task + Create New Task, and then select Task Name, Device, Target, Archive, Schedule and Cleanup.

3. Start Backup: Click Start Backup and choose Add the schedule and start backup now, or Add the schedule only.

4. Restore: From the main backup screen, click Restore for quick recovery if the original VM becomes corrupted. During restoration, you can choose Restore to new location to create a new VM in the same or a different datastore/host directly from the backup, eliminating the need to reconfigure the VM.

Conclusion

Migrating a virtual machine (VM) with Raw Device Mapping (RDM) introduces specific challenges and considerations that differ from standard VM migrations. RDM allows VMs in VMware environments to directly access physical storage devices, offering enhanced performance for certain applications. When migrating VMs with RDM, it’s important to carefully manage the process using methods such as vMotion, Storage vMotion, or cold migration to ensure seamless transitions while preserving data integrity and accessibility. Leveraging tools like AOMEI Cyber Backup can further enhance flexibility and scalability, especially when working across various virtualization platforms.