VMware Cloud Community
stepupccs
Contributor
Contributor

Finding the phantom VM

While attempting to deploy a guest os vm, my colleague received an error near the end of the deployment process. Upon retrying the deployment, he received an error message stating:

"The specified key, name, or identifier already exists"

We've browsed the datastore and deleted all entries pertaining to this partially deployed VM but continue to get the same message. Apparently there are still some entries somewhere causing VC to think the VM already exists on the host. Does anyone have any ideas how to resolve this issue? Are there any command line functions we can perform to locate and delete any lingering entries of this failed deployment?

0 Kudos
1 Reply
Texiwill
Leadership
Leadership

Hello,

We've browsed the datastore and deleted all entries pertaining to this partially deployed VM but continue to get the same message. Apparently there are still some entries somewhere causing VC to think the VM already exists on the host. Does anyone have any ideas how to resolve this issue? Are there any command line functions we can perform to locate and delete any lingering entries of this failed deployment?

I would use 'vm-support -x' to see if there is a running VM by the name given. I would also use 'vmware-cmd -l' to see if there is a VM registered by that name. I would also search other hosts for the same name.

In general, you may get this if VC has the name stuck somewhere within its databases. Deletion of a VM created by the VIC to VC connection should be deleted using the 'Remove from Inventory/Remove from Disk' options instead of going straight to the CLI. You can run a query on the SQL to determine if the name is still within the database. If its not on disk, not running, then I would suggest using a different name for the VM as its stuck in the DB.

You can also call your VMware Support Representative for a SQL statement that could clear up the problem. They may have one handy for you.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos