Shared VMDKs on vSphere ESX and ESXi

Got a comment on my share and share alike post that covered setting up shared VMDK files on VI3 / ESX 3.x. Seemingly it didn’t work any longer. Work or not, I figure it’s time to revisit this in a new way, using vCLI(rCLI)! This will require the following steps:

  1. Download & install the vCLI
    First download & install vCLI. I’ll wait… Ready? Fire it up and CD into the bin folder:
  2. Next we use to create the disk: –server -c 10G -d eagerzeroedthick /vmfs/volumes/lab/shared.vmdk -a lsilogic
  3. For each VM, walk through the add hardware wizard, selecting the following:

    1. Hard Disk

    2. Use Existing Hard Disk

    3. Browse to the location of the disk you created

    4. Under “Advanced Options” Change the “virtual device node” select a device that is on an unused adaptor (generally something in the 1: or 2: range) here’s a picture to help:
      Note: Use the same on both VMs. Consistency is good. mmmkay?

    5. Back under edit settings for the new VM, change the new disk controller’s “SCSI Bus Sharing” to “Physical”:
  4. Repeat for both VMs
  5. At this point you can power on the VMs & follow your OS vendors setup guideline for shared disks.

Hope you found this informative. Questions, comments, corrections, or requests? Drop a line in the comments!

6 thoughts on “Shared VMDKs on vSphere ESX and ESXi

  • Appears in vSphere 4.1 the answer is “no”. UI says “Virtual machine is configured to use a device that prevents the operations: Device ‘SCSI controller 1’ is a SCSI controller engaged in bus-sharing.”

  • You don’t need to use vCLI to create the disk you want to share. Just go to any of the vms that is going to use it and do it from there, with those settings ofc.
    Btw, thanks for this, it was exactly what I was looking for 😀

  • @Gogu,
    Actually I found it necessary to use vcli, and am grateful I found this blog. The viclient GUI was selecting thin provisioning and I could not select thick as it was grayed out. Also I wanted the shared disk on a separate custom folder but viclient was trying to be clever by choosing for me it’s own location. But with vmkfstools I was able to customize my options.

  • Does not work on esxi 5.1. windows failover clustering does not pass storage tests, says cannot get scsi persistent reservations.

    Also tried multiwriter flag, but makes no difference.

Comments are closed.