Clustering using sharing of VMDK’s between virtual machines

 This blog post explains how to share a VMDK between two virtual machines so they can be clustered or any application that needs two machines to share their disks.

    Assume there are two VMs that participate in the clustering

    Node-01 and Node-02

 

    Create a Virtual disk on Node-01 that has to be shared with Node-02

1.jpg

 

 

    Add a hard disk by clicking on Add a hardware and select Hard disk and click Next

2.jpg

 

 

   Select Create a new virtual disk

3.jpg

 

 

    Choose SCSI (1:0) which creates a fresh SCSI controller apart from the default one created during virtual machine creation and click Next

4.jpg

 

 

 

    Click on Finish

5.jpg

 

 

 

    Click on the newly created SCSI controller and change the SCSI Bus sharing option to “Physical

6.jpg

   Click on OK and power ON the machine

    Now the newly added disk shows up on the Node-01 machine as /dev/sdb.

7.jpg

     We need to add the Virtual disk created on Node-01 to Node-02

     Click on Edit Setting of Node-02 machine and select Add hardware and click on hard disk

     And click Next

8.jpg

    Click on “use an existing virtual disk” and click Next

9.jpg

 

 

    Browse to the location where Node-01’s VMDK file is present and select it

10.jpg

     Confirm the path and click Next

11.jpg

    Select SCSI (1:0) which creates a new SCSI controller on Node-02

12.jpg

     Review the changes and click Finish

13.jpg

    Select the newly created SCSI controller and select Physical under SCSI bus sharing option and click OK

14.jpg

 

    Power on Node-02 and confirm that Node-01’s shared disk is showing up on Node-02

15.jpg

   You might want to turn the Multi-writer flag in the advanced options of VM so you can let the machines write to the disk. Follow the below link for the same

    VMware KB: Disabling simultaneous write protection provided by VMFS using the multi-writer flag

   Note: This might cause some problems while doing vMotion of the machines involved in clustering. So do some research before you do it.

You can also find this blog post under my collection of blog posts on VMware Community

2 comments Add yours

Leave a Reply