Setting up a shared virtual disk (VMDK) between two virtual machines in vCenter is a strict requirement for high-availability database and application clusters, such as Windows Server Failover Clustering (WSFC) or Oracle RAC.
Welcome back to Terminal Notes. In this guide, we will walk through the precise configuration required to attach a single datastore disk to multiple VMs simultaneously, avoiding the common pitfalls that lead to boot failures or filesystem corruption.
⚠️ Architecture Warning: Clustering vs. File Sharing
Before configuring a shared disk, verify your use case:
- Do NOT use this for standard file sharing: If you need to share files between standard Windows or Linux VMs, provision a standalone file server and use SMB/CIFS or NFS. Direct sharing of a VMDK without cluster-aware software will corrupt your filesystem.
- Do NOT use this for Exchange DAG: Microsoft Exchange Database Availability Groups (DAG) manage data replication at the application layer. Each Exchange node requires its own independent, isolated disks.
- DO use this for cluster-aware applications: Solutions like Oracle RAC or traditional Failover Clusters that natively manage concurrent block storage access.
Step 1: Configure the Primary Node (VM1)
The first virtual machine acts as the origin point for the new disk.
- Power off VM1.
- Navigate to Edit Settings -> Add New Device -> SCSI Controller.
- Set the Change Type to VMware Paravirtual.
- Set SCSI Bus Sharing to Physical.
- Navigate to Add New Device -> Hard Disk and configure the exact parameters below:
- Disk Provisioning: Thick Provision Eager Zeroed (Mandatory for shared clustering).
- Sharing: Multi-writer.
- Virtual Device Node: Assign this to the newly created SCSI controller (e.g.,
SCSI controller 1->SCSI(1:0)).
Step 2: Configure the Secondary Node (VM2)
This phase is where the most common configuration errors occur. Do not create a new hard disk on the second VM. Both virtual machines must point to the exact same underlying file on the datastore.
- Power off VM2.
- Add a new SCSI Controller and configure it exactly as you did on VM1 (VMware Paravirtual, Physical Bus Sharing).
- Navigate to Add New Device -> Existing Hard Disk (Crucial step).
- Browse your datastore and locate the folder for VM1. Select the exact
.vmdkfile you created in Step 1.- Example Path:
[datastore] VM-01/VM-01_5.vmdk
- Example Path:
- Assign the disk to the matching Virtual Device Node on VM2 (e.g.,
SCSI(1:0)).
Common Gotchas and Troubleshooting
If your VM fails to start with an error such as Unable to create virtual SCSI device for scsi1:0 ... Module DevicePowerOn power on failed, check the following:
- Disk Mode Settings: By default, multi-writer disks often toggle to
Independent - Persistent. While this works for certain setups, standard VMware clustered VMDK configurations sometimes require this to be set toDependent. If the VM fails to boot, toggle the Disk Mode to Dependent. - Path Verification: Double-check the datastore path on VM2. It must explicitly point to VM1’s directory. If you see a path pointing to VM2’s own folder, you accidentally created a net-new disk instead of attaching the existing one.
- Hardware Version: Ensure both VMs are running a compatible VM hardware version (usually version 20 or later for the latest vSphere 8 cluster features).
- OS-Level Formatting: Only initialize, format, and mount the volume from the guest OS after both VMs have the multi-writer flag enabled and are powered on.