VMware Cloud Community
Argyle
Enthusiast
Enthusiast
Jump to solution

Unable to destroy "unknown (orphaned)" VM

After a cancelled P2V with VMWare converter i now have a VM on one of my hosts with the name "unknown (orphaned)". Im not able to remove it and it's not vissible with "vmware-cmd -l" command in Service Console.

2723_2723.JPG

When I try to remove it in VIC i get an error saying "Object reference not set to an instance of an object."

2722_2722.JPG

Im running ESX 3.5.0 (64607) and VC 2.5.0 (64192). Has onyone encountered this problem?

0 Kudos
1 Solution

Accepted Solutions
teoder
Contributor
Contributor
Jump to solution

Find the VM id number in the VC database end remove it completly. Should do the trick.

View solution in original post

0 Kudos
18 Replies
VMKR9
Expert
Expert
Jump to solution

Try restarting the virtual center service

0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

I've tried restarting the Host and the Virtual Center server, no go. I'm outa ideas....

0 Kudos
VMKR9
Expert
Expert
Jump to solution

Strange one, so you get the error when you do a right click remove from inventory? Sounds like you may have to start looking at directly editing the SQL database....

Argyle
Enthusiast
Enthusiast
Jump to solution

Yepp, the message is displayed when i right klick on the VM. It's probarbly some old info in the database, just don't know where to start looking... 😃

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

Does the vm folder exist on the vmfs? Does it have a vmx file? Try a manual unregister, /usr/bin/vmware-cmd -s unregister /path/to/vmx

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

There are no files on the VMFS volumes, the VM probarbly only exists in the database...

0 Kudos
T3Steve
Enthusiast
Enthusiast
Jump to solution

Out of curiosity, do you also see a blank/orphaned VM if you go into VMware HA, Virtual Machine options and then sort by hostname? Ditto under VMware DRS.

VCP3|VCP4|VSP|VTSP
0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

Yes, theres a VM with the name "unknown".

0 Kudos
espi3030
Expert
Expert
Jump to solution

Have you restarted the server that houses your database? I had same issue once and that cleared it up for me.

0 Kudos
xcomiii
Contributor
Contributor
Jump to solution

I had a similar situation, ended up with manually removing the files on the host and had to relase locks on them first.

0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

I've restarted the host and the virtualcenter server without result. There are no files (*.vmx, *.vmdk) attached to the unknown VM, it seems like it only exists in the database, nowhere else...

0 Kudos
kjb007
Immortal
Immortal
Jump to solution

Connect directly to the ESX server the vm appears to be on using the vi client, and try removing it from that interface.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
teoder
Contributor
Contributor
Jump to solution

Find the VM id number in the VC database end remove it completly. Should do the trick.

0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

Tried to connect to the Host that housed to VM but it did'nt show up.

0 Kudos
Argyle
Enthusiast
Enthusiast
Jump to solution

I got help from our DBA to find all entrys that belonged to the VM and deleted them. Now it's nowhere to be found. Thanks alot.

0 Kudos
libraboysg
Contributor
Contributor
Jump to solution

I also faced the same problem

Just to share .

To remove ophaned VM

Access the SQL database using Microsoft SQL Server Management Studio Express from

Go to database VIM_VCDB , table dbo.VPX_VM

Right click on the table Script Table as -> Delete To -> New Query Editor Window

Change the ID number to that of the VM and execute

0 Kudos
vCenter
Contributor
Contributor
Jump to solution

Hi,

Thanks for tips.

But just after deleted VM ID in table i can't start Virtual Center service, i have an error :

The description for Event ID ( 1000 ) in Source cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details

Thans for your help.

Yvan

0 Kudos
vCenter
Contributor
Contributor
Jump to solution

Resolved,

The same action but on .VPX_ENTITY.

Smiley Happy

0 Kudos