Error ‘Datastore Conflicts with existing datastore’ in Vcenter

Among the situations I have experienced is the collapse of one of the VMware hosts where you host your virtual machines. As a result, the following error may occur when you want to add a vcenter again when you raise your host. In this article, it is discussed how to solve this problem.

“Datastore ‘DataStoreX’ conflicts with an existing datastore in the datacenter that has the same URL (ds:///vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/) but is backed by different physical storage.”

The main causes of the u problem include conflicts because the datastore on the host where you are having problems is still visible on the vcenter, for example, whether the name is DataStoreX. To resolve this issue, Vcenter must also remove the conflicting datastore from inventory. In most cases, this problematic datastore cannot be removed due to the Vcenter tween, it may be necessary to go deeper to solve the problem. This issue will be resolved by deleting the object that is causing the problem through the Vcenter database. The actions taken in this article are performed on Vcenter Server Appliance (VCSA) and use the VCSA vPostgres database. Warning: Because operations are performed on the Vcenter database, it is recommended that Vcenter take a snapshot or backup before starting operations. It is connected primarily by VCSA ssh. .

service-control --stop vmware-vpxd

The psql tool is run. /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

the datastore (datastorex) table that we want to remove through the vcenter by running the following command has an ID

SELECT id FROM vpx_entity WHERE name = 'DataStoreX';


See also  VMware Tools ISO image does not exist or is inaccessible


(1 row) Datastore’s ID id was found as above. To see which objects are connected to this datastore, the following command is run by specifying the datastore ID that we found.


SELECT * FROM vpx_ds_assignment WHERE ds_id=1537714;

The result appears to be that an object is connected to the datastore. To get information about what the object found is, the following code is run by typing the object’s credential.

SELECT * FROM vpx_entity WHERE id=1537713;

As a result above, I verify that the object connected to the datastore is a virtual server named SERVERX, which is not actively used on this datastore in the case of availability, This prevents us from deleting the corresponding DataStoreX. We delete the datasore, which we cannot delete in the Vcenter GUI, from the database with the following codes. When we reboot Vcenter, we confirm that the problematic datastore does not appear in inventory. We can now add the host that we could not add to Vcenter

DELETE FROM vpx_ds_assignment WHERE ds_id=1537713;

DELETE FROM vpx_datastore WHERE id=1537713;

DELETE FROM vpx_vm_ds_space WHERE ds_id=1537713;

delete from vpx_entity where id=1537713;;

service-control –start vmware-vpxd


Computers – Tablets – Components Best Sellers

Leave a Comment