How to Enable Multi-Writer VMDK Flag on VMware Virtual Machines?

ESXi host file system (datastore) will be formatted with VMFS file system. It is a clustered file system shared across multiple esxi host. It also prevents multiple virtual machine from accessing and writing to the same VMDK (virtual disk). This prevents the virtual machines accessing other Virtual machines disks (.VMDK files) to avoid data corruption or data loss.  There are some other vSphere technology such as  VMware fault tolerance allows 2 virtual machines such as Primary virtual machine and standby virtual machine access the .VMDK file simultaneously with the help of multi-writer option. Multi-writer  VMDK option allows VMFS-backed disks to be shared by multiple virtual machines. Multi-writer option ensures the third-party cluster-aware  application such as Oracle RAC, in which the applications ensure that writes originate from two or more different virtual machines, does not cause data loss. We are running with multiple instance of production Oracle RAC workloads with multi-writer option enabled. Prior to vSphere 6.0 Update 1, we need add an configuration entry for each disk in the Virtual machine configuration option. From vSphere 6.0 Update 1, Support for enabling multi-writer flag on the VMDk virtual disks is included as part of the vSphere Web Client. We will discuss in detail about enabling multi-writer prior  and after vSphere 6.0 Update 1.

How to Enable Multi-Writer VMDK Flag on VMware Virtual Machines?

As i already mentioned, Procedure for enabling multi-writer flag prior and after vSphere 6.0 update 1 is different.  You can also use command line method by adding configuration settings in VMX after vSphere 6.0 Update 1 but support for multi-writer VMDK flag avialable in Web client only after vSphere 6.0 Update 1. Let’s take a look at detailed procedure for both the methods.

Enable Multi-Writer Flag prior to vSphere 6.0 Update 1

Adding Multi-Writer VMDK flag Using vSphere Client

Power-off the virtual machine. Right-click on the Virtual Machine and Select “Edit Settings”. Do not change the SCSI Controller’s SCSI Bus Sharing options. Keep the default selection, None.

Multi-Writer VMDK

Go to Options Tab, Under General option, Click on Configuration parameters to add the configuration entry for multi-writer VMDK flag.

Enabling Multi-Writer VMDK_2


Add rows for each of the shared disks and set their values to  multi-writer. For Example If you want to enable multi writer flag for your VMDK disk “SCSI0:1” then Click on Add Row, Enter scsi0:1.sharing” in the name filed and Enter multi-writer” in the value field.Click on Ok.

Enabling Multi-Writer VMDK_3

Manually adding multi-writer flag in Virtual Machine Configuration (.VMX) file 

  1. Power off the virtual machine.
  2. Log in to the ESXi host on which virtual machine is located with SSH.
  3. Browse towards the the virtual machine’s Configuration file (VM_name.vmx) file location (located at /vmfs/volumes/datastore_name/vm_name).
  4. It is always recommended to create the backup file of .VMX before making edit to the virtual machine configuration file. You can create backup using the command  (CP VM_name.vmx VM_name.VMX.bak)
  5. Open and edit the original .vmx file with a text editor such as VI editor. Enter “i” to start inserting the edits.
  6. Add this entry to the end of the .vmx file:  SCSI0:1.sharing = “multi-writer”
  7. Close and save the .vmx file using  (:wq)
  8. Power on the Linux virtual machine.

Enabling Multi-Writer VMDK_4

You can verify the Configuration Edits is applied or not using the below command:

cat VM_Name.VMX | grep multi-writer

Enabling Multi-Writer VMDK_5


Enable Multi-Writer Flag after vSphere 6.0 Update 1

Both the above 2 methods applicable for virtual machines after vSphere 6.0 update 1 too. From vSphere 6.0 Update 1, procedure to add multi-writer VMDK flag become simplified by adding the option in vSphere Web Client. In the vSphere Web Client, Right-click on the Virtual Machine and Select “Edit Settings”.  Virtual Hardware ->  Expand the Hard Disk which you want to enable multi-writer flag -> Sharing -> Multi-Writer. Click on Ok.

Enabling Multi-Writer VMDK_6

That’s it. We are now clear with the understanding of multi-writer flag and how to enable multi-writer vmdk flag for virtual machine prior and after vSphere 6.0 Update 1. I hope this is informative for you. Thanks for Reading!!. Be social and share it in social media, if you feel worth sharing it.