VMware ESXi: Shared Disk Between VMs

In some cases (as a rule in clustering scenarios) it may be necessary to share the same disk between 2 (or more) virtual machines (VMs). The most optimal way is to use the vmdk disk physically located on the shared storage or locally on the ESXi host. If you want to use shared drives on different ESXi hosts, you can only use the shared storage (datastore).

Suppose the shared external storage (connected to each ESXi host using iSCSI or Fibre Channel SAN) have already presented to all VMWare ESXi hosts, which are running the VMs you want to add a shared virtual drive. On both virtual machines you need to add a new SCSI controller.

VMware: Shared disk between virtual machines

In the vSphere Client inventory select first virtual machine (Node 1), right click on it and select Edit Settings.

vmware shared disk

To add a new virtual device select SCSI controller in the dropdown list and press Add button.

shared disk vmware

As a type of SCSI controller select LSI Logic SAS.

Now you need to choose the desired SCSI Bus sharing mode:

  • Virtual – virtual disk shared between VM on the same ESXi host
  • Physical – vmdk file can be shared between VM on different ESXi hosts

vmdk shared disk

Press OK. Next you need to add a new virtual drive on the first VM (New Device -> New Hard Disk -> Add) with the following disk settings:

  • VM Storage Policy: optional
  • Location: you need to select a shared datastore name, that will store the disc
  • Disk Provisioning: select Thick provision eager zeroed (another disk provisioning modes are not suitable)
  • Sharing: Multi-writer
  • Virtual Device Node: select created earlier SCSI controller
  • Disk mode: Independant – Persistdent – in this mode you can’t create a snapshots for a shared drive

esxi shared virtual disk

In the same way you need to add a new SCSI controller to another virtual machine (Node 2). After that in the settings of the second virtual machine you need to add a new disk (Existing Hard Disk).

exhisting hard disk vmware

In the menu that appears, select Datastore, which kept the shared disk you created earlier. In the submenu, select the name of the first virtual machine and in the middle pane select the desired vmdk disc file.

vmware shared vmdk

If you want to use more than one shared disk on VMware, keep in mind that each of them does not require the addition SCSI controller. One controller can serve up to 16 different drives.

After changing the virtual machines settings, connect to the console of the guest OS virtual machine. In this case the VM with Windows. Start the Computer Management console and expand Storage -> Disk Management section. Right click and select Rescan Disk.

initialize disk vmware

The system detects the new disk and offer to initialize it. Select the desired partition table (MBR or GPT), create a new partition and format it. Similar operations must performed on the second VM. After these settings, both VMs use shared disk.

You may also like:

Configure Autostart of VM on VMware ESXi By default, virtual machines located on VMWare ESXi or VMware Hypervisor is not starting automatically at the host boot. This means that after the ESX...
How to Mount Windows Folder into VMware ESXi In this article we will take a look on how to connect a network folder from Windows 2012 R2 Server as a datastore on the VMware ESXi host and use it t...
Clone Windows 10 and Installed Data to a New Hard ... In this tutorial, we will show you how to migrate Windows 10 and all installed data to a new hard drive. The same process applies if you are migrating...
GPT or MBR: How to Check HDD Partition Table Style The modern versions of Windows and other operating systems can use one of two standards to store information about hard disk partitions structures. Th...
VMWare – Delay VM Bootup Time You will need to change a few things in your .vmx file for your virtual machine. In Windows Vista and Windows 7 the default location of your virtual m...
  • Paris Wells

    This would only be good for Oracle RAC is that correct not windows File Shares?

    • This solution can be used in different Windows failover cluster configurations (MSCS)

      • Paris Wells

        I think …. that the MSCS requires SCSI locking / reservations in order to function properly, it does not support simultaneous writes I have tried using the multi-writer flag with a MSCS setup and it failed the pre-deployment validation testing.

  • Thomas Andersson

    Trying to follow these guidelines but it just doesn’t work. Every time I create the virtual disk and go to the second machine and try to add it the second machine says it’s lazily zeroed and not shareable. (it’s thick, eagerly zeroed and says so on the first machine)

    • Daniel Lewis

      You probably have the new SCSI controller configured for Physical. If you switch it over to Virtual, you should be able to see it as eagerly zeroed and able to change the sharing options. I’m assuming you’re trying to share a drive between two VMs running on the same ESXi host.

  • Steve Buckley

    I got this to work, to a point. Newly Created files/or changes in general on one server are not seen on the other server unless I disconnect/reconnect the shared disk. Any tips on that?