VMware Cloud Community
RahulC
Contributor
Contributor
Jump to solution

A virtual machine or template having the same name is already registered. Server Error: The specified key, name, or identifier already exists.

Hello Everyone,

I have few virtual machines on an ESX host , the state of these virtual machines is showing as disconnected.The ESX host hosting those virtual machines is also disconnected. I was going to reinstall ESX on that host but cant do so untill i get these few VM's registered on another host. I am not able to remove these machines from the inventory and when i try to readd these machines to the inventory while browing them from the datastores i get an error "A virtual machine or template having the same name is already registered. Server Error: The specified key, name, or identifier already exists."

  The ESX host which is hosting these VM's isnt responding either.

Any help will be appreciated

0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal
Jump to solution

yes, if you can't connect to the host directly, via the CLI or GUI, to the guests, I would try to connect to the quests in another fashion to gracefully shut them down prior to powering down the host.  Once the guests are shutdown, you can add them back to inventory by browsing the datastores manually or automated.

First thing is to remove the host from vCenter.

View solution in original post

0 Kudos
7 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

If the host is in a disconnected status, can you just "remove" Host? This will also remove the disconnected guests.

From there you may use a PowerCLI script to walk your datastores and register the "orphaned" guests, assuming they are powered off

http://www.lucd.info/2011/08/11/vmx-raiders-revisited/

Also, have you tried restarting the managment agents on the host in question to see if you can get the host back into inventory?

0 Kudos
RahulC
Contributor
Contributor
Jump to solution

This ESX host isnt responding to any root commands which is the reason why i was planning to reinstall ESX on that host. I also found this

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200413...

0 Kudos
MauroBonder
VMware Employee
VMware Employee
Jump to solution

try look this kb http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100096...

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos
RahulC
Contributor
Contributor
Jump to solution

no this one is not going to work as the host isnt responding to any root commands

0 Kudos
RahulC
Contributor
Contributor
Jump to solution

Hello Troy,

If i remove the host , i should be able to add the machine to the inventory by browsing to the datastore and adding the machine to inventory, isnt it?. Also if if i power off this host, that should also do?

0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

yes, if you can't connect to the host directly, via the CLI or GUI, to the guests, I would try to connect to the quests in another fashion to gracefully shut them down prior to powering down the host.  Once the guests are shutdown, you can add them back to inventory by browsing the datastores manually or automated.

First thing is to remove the host from vCenter.

0 Kudos
RahulC
Contributor
Contributor
Jump to solution

Thanks,

That worked

0 Kudos