VMware error: Datastore ‘datastorename(XX)’ conflicts with an existing datastore in the datacenter that has the same URL (ds://vmfs/volumes/UUID/),
VMware error: Datastore ‘datastorename(XX)’ conflicts with an existing datastore in the datacenter that has the same URL (ds://vmfs/volumes/UUID/),

VMware error: Datastore ‘datastorename(XX)’ conflicts with an existing datastore in the datacenter that has the same URL (ds://vmfs/volumes/UUID/),

Hola a tod@s

En esta oportunidad veremos cómo solucionar el problema “Datastore ‘datastorename(XX)’ conflicts with an existing datastore in the datacenter that has the same URL (ds://vmfs/volumes/UUID/)“.

Se presentan los siguientes síntomas:

  • No se puede eliminar el datastore del inventario de vCenter Server.
  • Todas las opciones en el datastore están bloqueadas.
  • Se presenta el siguiente error -que vemos en la imagen a continuación- al agregar un host ESXI a vCenter Server:

Para poder resolver este problema, tenemos que eliminar manualmente las referencias al datastore con problemas del inventario de vCenter Server.

Para comenzar, nos conectamos a nuestro vCenter a través de SSH.

Activamos el acceso a la shell con el comando:

$ shell.set –enabled true

Accedemos con el comando:

$ shell

Paramos el servicio “vpxd” con el siguiente comando:

$ service-control –stop vmware-vpxd

Accedemos a la base de datos de Postgres con el siguiente comando:

$ /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

En caso de que no tengamos la password, usamos los siguientes comandos para poder obtenerlo:

$ cd /etc/vmware-vpx

$ ls

Buscamos lo siguiente “PGUSER_PASSWORD” dentro del archivo:

$ cat embedded_db.cfg

Accedemos a la base de datos de Postgres con el siguiente comando:

$ /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

Para acceder a la lista de datastore en vCenter 6.7/7.x:

VCDB-# select * from vpx_datastore;

Buscamos el UUID del datastore (DS) afectado e identificamos el ID el datastore afectado.

Para confirmar el ID correcto según sea necesario, ejecutamos:

VCDB=# select * from vpx_entity where id=20;

Tenemos que borrar las siguientes entradas: vpx_ds_assignment, vpx_vm_ds_space, vpx_datastore y vpx_entity. Usando la query: delete from vpx_ds_assignment where DS_id=XXXX;

VCDB-# delete from vpx_ds_assignment where ds_id=20;

VCDB-# delete from vpx_vm_ds_space where ds_id=20;

VCDB-# delete from vpx_datastore where id=20;

VCDB-# delete from vpx_entity where id=20;

Salimos de Postgres usando:

VCDB=# \q

Iniciamos nuevamente el servicio “vmware-vpxd” para reflejar los cambios.

$ service-control –start vmware-vpxd

Con el servicio arriba podemos volver a conectarnos a nuestro vCenter y agregar nuevamente el host con problemas.

Espero que esta información pueda ser de ayuda, y cualquier duda o sugerencia la dejan en los comentarios. Saludos.

Leave a Reply

Your email address will not be published. Required fields are marked *