VMware Cloud Community
cardertd
Contributor
Contributor
Jump to solution

Cannot add host to vCenter server because datastore is shared with an existing vCenter host

  I recently removed a physical host from a vCenter Server virtual appliance and am not able to add it back to vCenter Server because I get an error about the datastore already existing.  I am running a simple vCenter Server environment with two physical hosts and shared storage.  I have only been administering vCenter for a few months, so I am relatively new to the technology and processes.  I have searched the Internet for a few days now, but have not found any documentation of anyone experiencing the same problem as I (which I find odd considering how simple my configuration and problem), so I wanted to get some help from the VMware community.

  I got an error message one day that vCenter Server couldn't connect to one of the two hosts so I removed the host (instead of disconnecting and connecting as I should have done).  Now I am not able to connect the host to vCenter server because the shared storage datastore conflicts with the same datastore used by the existing host in vCenter Server.  The error message I get is ""Datastore 'datastore_name' conflicts with an existing datastore in the datacenter that has the same URL (ds:///vmfs/volumes/UUID/), but is backed by different physical storage."  I try to unmount the datastore from the host, but get the following error message: "The resource 'Datastore Name: datastore_name VMFS uuid: UUID' is in use."  The error stack says, "Call "HostStorageSystem.UnmountVmfsVolume" for object "storageSystem" on ESXi "IP address" failed.  Cannot unmount volume 'Datastore Name: datastore_name VMFS uuid: 'UUID' because file system is busy. Correct the problem and retry the operation."  I have tried removing all virtual machines from inventory, putting the hosts in maintenance mode, rebooting the physical hosts, but none of my troubleshooting is helping.

  I am not sure what steps to take to get this datastore unassociated with the host so that I can add it back into vCenter Server.  Any help you can provide me is appreciated.

1 Solution

Accepted Solutions
dangingerich
Enthusiast
Enthusiast
Jump to solution

Good thing that you already moved the VMs over.  As far as "disconnect" goes, "unmount" or "delete" could work just the same.  You may need to put the host into maintenance mode or even reboot the host before you can unmount the datastores.  In an extreme case, I have even had to clean off the host and completely rebuild it from the hypervisor install on up.  It isn't that hard or doesn't take that long to reinstall, so don't be sheepish about it.  A clean reinstall might even save you time compared to removing datastores. 

View solution in original post

Reply
0 Kudos
20 Replies
abhilashhb
VMware Employee
VMware Employee
Jump to solution

Login into the individual host and rename the datastore. Then add it.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

Reply
0 Kudos
cardertd
Contributor
Contributor
Jump to solution

I actually thought to try that already, but didn't include that troubleshooting step in my original post.  I get the same error ("Datastore 'test' conflicts with an existing datastore in the datacenter that has the same URL").

Reply
0 Kudos
dangingerich
Enthusiast
Enthusiast
Jump to solution

Do you have any VMs running on the new host yet?  If so, bring them down, then bring them up on the other host.  Disconnect the datastores, and then add the host to the vCenter server.  Once added, you can then re-add the datastore to the host. 

Reply
0 Kudos
cardertd
Contributor
Contributor
Jump to solution

  I have all my Virtual Machines on the host that is already attached to vCenter Server.  The one I removed from vCenter doesn't have any VMs on it.  The problem is I am not able to unmount the datastore on this disconnected host.  I get the aforementioned error message that the filesystem is in use when I try.  What exactly did you mean by "disconnect the datastores"?

Reply
0 Kudos
dangingerich
Enthusiast
Enthusiast
Jump to solution

Good thing that you already moved the VMs over.  As far as "disconnect" goes, "unmount" or "delete" could work just the same.  You may need to put the host into maintenance mode or even reboot the host before you can unmount the datastores.  In an extreme case, I have even had to clean off the host and completely rebuild it from the hypervisor install on up.  It isn't that hard or doesn't take that long to reinstall, so don't be sheepish about it.  A clean reinstall might even save you time compared to removing datastores. 

Reply
0 Kudos
cardertd
Contributor
Contributor
Jump to solution

I thought about reinstalling vCenter Server to resolve the issue, but I don't think that would help with the shared datastore problem, since the hosts are what is connected to the datastore.  I like your idea of reinstalling the hypervisor on the host that won't reconnect to vCenter.  I could connect it to vCenter Server, then add the datastore.  I will mark your reply as "Correct Answer" if that resolves the issue.

Reply
0 Kudos
cardertd
Contributor
Contributor
Jump to solution

Reinstalling ESXi 5.5 on the host was the only thing I tried that resolved the issue.  ESXi had gotten hosed up at some point, because I couldn't even get a keyboard hooked up to the concole to work.  After reinstalling ESXi, I was able to add the host to vCenter Server and mount the existing datastore.  Thank you for the suggestion, dangingerich.

Reply
0 Kudos
HariRajan
Hot Shot
Hot Shot
Jump to solution

Yes this issue very simply can be resolved.

If you are getting below issue

Click on the storage view in the web client

You can see a red color bang which is the datastore of disconnected and removed host from the vCenter. You are going to add the same host again to the data center bearing same data store id.

Click on the red flag datastore and click on the related objects . you can see some VM’s there

Click on the VM , in my case only one VM , which is  vUpdate , check the summary of the VM , data store part

You can see two datastore there , In that one will surely the red  bang one.

Go to VM edit settings , you can see that red bang datastore I have used to mout the ISO in the DVD Drive. I don’t need that , just select host in that and save.

Now you check the summary of the VM , there should be only one data store or the red flag data store won’t be there.

                                 

Continue this process till red flag goes , since I have only one VM , I just remove that that from VM edit settings and now  that particular data store is not visible at all.


--> Add the host now , It will work  I am sure

Please find the attached snapshot for more clarity.

Thanks & Regards in Plenteous . Hari Rajan
jtessier72
Contributor
Contributor
Jump to solution

HariRajan's solution worked perfectly for me. Reinstalling isn't an option in many cases, and this was certainly faster.

Thanks!

shingudaze
Contributor
Contributor
Jump to solution

HariRajan... you sir, are a genius.

dlucrecrossmull
Contributor
Contributor
Jump to solution

HariRajan's answer worked for me too.  I had 4 VMs which had been migrated to a new host, but still referenced the ISO images on the old host.

Removing the reference to the ISO images from each VM then resulted in the Inactive datastore disappearing from the inventory as expected.

HariRajanHariRajan you are the best!

gopalb85
Contributor
Contributor
Jump to solution

HariRajanHariRajan's solutions worked fine. Thanks

dmoraru
Contributor
Contributor
Jump to solution

Hari, you sir are a genious.

Many thanks. This was bugging me for some time now.

Reply
0 Kudos
rakesh0938
Contributor
Contributor
Jump to solution

Hi Hari,

In my case there no bang sign on datastore, but still i get the same reported error. Any clue or suggestion?

Regards,

Rakesh

Reply
0 Kudos
davidmatthewson
Contributor
Contributor
Jump to solution

Thanks for that - I had an almost identical problem which turned out to be shared ISO image. I didn't get red alert plings but could no longer do vMotion and when I removed a host I could not add it back due to the 'identical url' error msg.

So I went though removing the ISO from each machine and then I could add the host back into vCenter and do vMotions.

Great- many thanks.

D

Reply
0 Kudos
jg3lc
Contributor
Contributor
Jump to solution

HariRajan, Thank you.   This worked perfectly, I had almost the same situation -- a mounted ISO from the datastore in question.   Upon removing that mounting from the VM I could re-add the host without losing the data on the disk.

Reply
0 Kudos
Jean_R
Contributor
Contributor
Jump to solution

HariRajan, even yeatrs latte your answer still save lifes Smiley Happy, thanks !

Reply
0 Kudos
sucram65
Contributor
Contributor
Jump to solution

This is old but it was exactly the situation I had in a mixed 6.0 - 6.7 environment. This solution worked even after 5 years of changes.

Reply
0 Kudos
cdoublejj
Enthusiast
Enthusiast
Jump to solution

yeah NONE of the buttons are there, ESPECIALLY related objects!

EDIT: found a related object in summary but, it's empty and blank.

Reply
0 Kudos