Skip navigation

    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


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



   Select Create a new virtual disk


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


    Click on Finish


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


   Click on OK and power ON the machine


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


     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



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



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



     Confirm the path and click Next






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


     Review the changes and click Finish




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


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


   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.


I ran into some issues in my lab while trying to delete the entities like Org vDC, Edge gateways and Org Networks on vCloud Director(happens with all the versions) . I couldn't delete the Org vDC as it was dependent on the Edge gateway. I couldn't delete Edge Gateway as it was dependent on a routed Org Network. And Org Network would not get deleted . Things like this happen when vCD losses connectivity to vShield or some activities that are performed on vCenter directly which affect the vCD environment. The best thing to do is not to mess around with the vCenter once it is added to the vCD. But sometimes things get out of hand and everything gets messed up and we need to look for a way out of it.


I tried deleting the entities on vCenter as they had lost connectivity to vCD and that made things worse. The problem with vCD is, it does not have an option to force-delete an entity. If it looses connectivity then the entities are there in the portal in an inconsistent state and you will not be able to delete them. The whole Environment looks messy. Sometimes it so happens that after deleting all the entities in an Org vDC it still does not allow you to delete the Org vDC, though all the resources that are related to it on vCenter too are deleted.


The only way to get out of this is to either get into the database level and delete the entries for these stranded/un-deletable entities or to reset the database and configure the vCD cell all over from scratch.


Obviously someone like me who does not have knowledge about SQL would not want to go to the level of deleting the entries of tables in a database. But configuring the cell all over again would require configuring all the things again. Which is again a tedious task. So i decided i will try deleting the entries and if i screw up the database i anyway have to configure the vCD cell again which i was thinking of doing initially.


After doing a lot of research online i found couple of blogs and links that spoke about deleting the entries manually on a vCloud DB level(for MS-SQL).


Lets jump straight into it. At first you need to connect to your database server and connect to your instance through SQL Management Studio(for SQL Server, not sure how this works on Oracle)


Run the below script to get the entries of all the entities like the Org vDCs, Network pools, Edge gateways and Org vDC


/****** To List the Table entries *******/

SELECT TOP 1000 [id]




FROM [vcloud].[dbo].[vdc_logical_resource]


Where [vcloud] is the name of the vCloud Director database instance.


Now to move the Org Networks to other Organization vDCs you will have to run the below query:


UPDATE vcloud.dbo.vdc_logical_resource

SET vdc_id = 0xabunchofUUIDnumbersfortheorganization

WHERE id = 0xabunchofUUIDnumbersforthenetwork;

Here (vdc_id) is the organization you want the network to move to and (id) is the parameter that pertains to a particular entity which you consider to move to another vDC.

If you need to delete the entry in the database table

DELETE FROM vcloud.dbo.vdc_logical_resource

WHERE id = 0xabunchofUUIDnumbersforthenetwork;

where (id) will be the id of the entity you want to delete.

And if you are someone who is familiar with SQL Database then you can figure out more commands to modify tables and makes things right.