Sharing an RDM virtual disk between multiple virtual machines
search cancel

Sharing an RDM virtual disk between multiple virtual machines

book

Article ID: 342227

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article discusses sharing a virtual disk between two virtual machines without using a clustering service on the guest Operating System.


Environment

VMware ESXi 7.x

VMware ESXi 8.x 

Resolution

Note: For instructions to build and configure a Microsoft Cluster, see Setup for Failover Clustering and Microsoft Cluster Service. For more information, see: About Setup for Windows Server Failover Clustering on VMware vSphere

If the shared disk is not managed by some kind of clustering service (such as Microsoft Cluster Service (MSCS), Symantec Veritas Cluster Server (VCS), or equivalent) on the guest Operating System, be aware that attaching the virtual disk to more than one virtual machine while they are turned on does not have the desired result of a shared storage device.

 

Since the operating system caches changes made to a disk, a write to a volume by one virtual machine is not seen by the other virtual machine which means the change is not known. The other virtual machine could subsequently overwrite the first change. This also allows for data corruption.

 

VMware recommends creating a RAW LUN and creating an RDM pointer in virtual compatibility mode to it for both virtual machines. For details, see the Raw Device Mapping section in the VMware documentation.

One viable way to use this safely is to have only one virtual machine use this device in read-write and the others in read only. The downside is that the virtual machines that are read-only still have to unmount and remount the volume before new data written from the read-write host is seen.

 

Alternatively, if the virtual machines are both using the volume as read-write, make sure not to have more than one powered up at a time.