Migrating virtual machines with Raw Device Mappings (RDMs)
Purpose
This article discusses some of the common questions that arise when migrating virtual machines that utilize Raw Device Mappings (RDMs).
Migrating of virtual machines with RDMs can be performed in three ways:
- Warm migration (vMotion) with the virtual machine powered on.
- Cold migration with the virtual machine powered off.
- Storage migration (Storage vMotion) with the virtual machine powered on.
Resolution
vMotion
- Files for a virtual machine are not relocated when it is vMotioned.
- The virtual machine is re-registered to the destination host.
- Any RDMs remain as RDMs when the virtual machine is registered to another host. That is, no changes to the virtual machine itself are made.
Cold Migration
With file relocation:
- Any non-RDM virtual disks are physically moved to the destination.
- The virtual machine configuration files are physically moved to the destination.
- Raw LUNs themselves cannot be moved, as they are raw disks presented from the SAN. However the pointer files (RDMs) can be relocated if required.
- When performing a cold migration of a virtual machine with RDMs attached to it, the contents of the raw LUN mapped by the RDM are copied into a new .vmdk file at the destination, effectively converting or cloning a raw LUN into a virtual disk. This also applies when the virtual machine is not moving between ESX hosts. In this process, your original raw LUN is left intact. However, the virtual machine no longer reads or writes to it. Instead, the newly-created virtual disk is used.
- If you wish to cold migrate a virtual machine without cloning or converting its RDMs, remove them from the configuration of the virtual machine before migrating. You can delete the RDM from the disk when removing it (the raw LUN contents are not changed). Re-add them to the configuration when completed.
Without file relocation:
- The virtual machine registration changes, but the files are left untouched.
Cloning
If you want to clone a virtual machine without its RDMs, remove them from the configuration of the virtual machine before migrating. You can delete the RDM from the disk when removing it (the raw LUN contents are not changed, only the RDM mapping file is deleted). Re-add them to the configuration when completed.
Storage vMotion
- When you perform Storage vMotion, the virtual machine files are physically relocated to a destination datastore. The same host retains ownership or registration of the virtual machine after Storage vMotion completes.
- For Virtual Infrastructure 3.5, Virtual Disks and Virtual and Physical Mode RDM pointer files can be relocated to the destination datastore but cannot be converted to thick-provisioned or thin-provisioned disks during migration.The RDM pointer files of the virtual machine remain as RDM pointer files when the process completes.
- For vSphere 4.0 and higher, Virtual Disks and Virtual Mode RDM pointer files can be relocated to the destination datastore, and can be converted to thick-provisioned or thin-provisioned disks during migration as long as the destination is not an NFS datastore. Physical Mode RDM pointer files can be relocated to the destination datastore, but cannot be converted.
For instructions on using Storage vMotion, see Moving virtual machines with Storage vMotion (1005544).
This table summarizes the available options and requirements:
Storage vMotion (SvMotion)
|
VirtualCenter 2.5
|
vCenter Server 4.x
|
RDM virtual compatibility mode
|
RDM physical compatibility mode
|
Can the virtual machine change hosts?
|
Virtual machine Snapshots
|
ESX/ESXi 3.5
|
Supported using the remote CLI script:svmotion.pl.
|
Yes
| Yes | Yes |
No
|
Virtual machine must not have snapshots while performing SvMotion.
|
ESX/ESXi 4.0 and higher
|
Not supported: VirtualCenter 2.5 cannot manage ESX/ESXi 4.0 and higher hosts.
|
Yes
|
Yes
| Yes |
Yes
|
Virtual machine must not have snapshots while performing SvMotion.
|
Note: Storage vMotion of virtual machines using virtual compatibility mode RDMs is supported, however clustered applications or clustered virtual machine configurations do not support Storage vMotion.
For information about the Storage vMotion CLI script, see:
- Storage vMotion Remote Command-Line Syntax in the Basic System Administration Guide for your version of VMware ESX.
- The vSphere Command-Line Interface Documentation.
For Storage vMotion requirements and limitations, see the Storage vMotion Requirements and Limitations section of theBasic System Administration Guide for your version of ESX.
Additional Information
Snapshots
Ensure that snapshots are committed before performing storage migrations, especially if you are removing mappings or disks from your virtual machine configuration and later re-adding them. During re-addition of the respective disk, the VMware Infrastructure or vSphere Client does not allow you to re-select a specific (the previous) snapshot level or .vmdkfile to add back to the virtual machine configuration.Block size and capacity limitations of your destination datastore
Raw Device Mappings occasionally represent large raw LUNs. If you clone virtual machine with an RDM still attached, the contents of the raw LUN mapped by the RDM are copied into a new virtual disk (
.vmdk
) file at the destination. Converting a RDM into a virtual disk (.vmdk
) file does not succeed if your destination or target datastore does not have the capability of storing single contiguous files as large as the raw LUN. Large virtual disks have the same requirements or constraints.For example, if your destination datastore is VMFS 3 created with a 2 MB block size and the RDM or virtual disk being converted or migrated is 640 GB, the process fails. A VMFS 3 block size of 4 MB or higher is required so you can store files larger than 512 GB. For more information, see Block size limitations of a VMFS datastore (1003565).