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 vSphere ESXi 5.0
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable
VMware vSphere ESXi 6.0
VMware ESXi 3.5.x Embedded
VMware ESX Server 3.5.x
VMware ESX 4.0.x
VMware ESXi 3.5.x Installable
VMware ESX 4.1.x
VMware ESX Server 3.0.x
VMware ESXi 4.0.x Embedded
VMware vSphere ESXi 5.1
VMware ESXi 4.1.x Embedded
VMware vSphere ESXi 5.5

Resolution

Note: For instructions to build and configure a Microsoft Cluster, see Setup for Failover Clustering and Microsoft Cluster Service. For more information, see:
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.

Additional Information

For translated versions of this article, see: