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:
- Download & install the vCLI
First download & install vCLI. I’ll wait… Ready? Fire it up and CD into the bin folder:
- Next we use vmkfstools.pl to create the disk:
vmkfstools.pl –server 192.168.15.8 -c 10G -d eagerzeroedthick /vmfs/volumes/lab/shared.vmdk -a lsilogic
For each VM, walk through the add hardware wizard, selecting the following:
Use Existing Hard Disk
Browse to the location of the disk you created
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?
- Back under edit settings for the new VM, change the new disk controller’s “SCSI Bus Sharing” to “Physical”:
- Repeat for both VMs
- 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”
Does this still allow DRS/VMotion of both VMs?
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 😀
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.
Saved my day ! Thanks.
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.