VMware Cloud Community
lhedrick
Enthusiast
Enthusiast
Jump to solution

Can not delete Orphaned VMs from VirtualCenter

Where I work someone deleted some VMs by deleteing them from the disk via SSH on an ESX Server. However, now they all show up in light grey as MACHINENAME (orphaned) in VirtualCenter (2.0.2-61426). The only options on them when you right click is Snapshot, Add Alarm, Add Permission, Open Console, Report Performance, and Remove From Inventory.

When I click Remove from Inventory, and click Yes to the "are you sure" dialog, I then get a dialog box with "Permission to perform this operation was denied."

Any Ideas on how to delete these from VirtualCenter...?

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
thickclouds
Enthusiast
Enthusiast
Jump to solution

Remove will take it out of VirtualCenter for good and is a fine action to take. If all the files were deleted from the console this is really your only option.

Charlie Gautreaux vExpert http://www.thickclouds.com

View solution in original post

Reply
0 Kudos
11 Replies
thickclouds
Enthusiast
Enthusiast
Jump to solution

Remove will take it out of VirtualCenter for good and is a fine action to take. If all the files were deleted from the console this is really your only option.

Charlie Gautreaux vExpert http://www.thickclouds.com
Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Try logging into VirtualCenter using the local "Administrator" account on the VC server and removing the VM from inventory.

Chamon
Commander
Commander
Jump to solution

Restart the

Vmware VirtualCenter Server Microsoft service

on the VC

if that doesn't do it then:

on ESX host

services mgmt-vmware restart

lhedrick
Enthusiast
Enthusiast
Jump to solution

I have tried logging in as the local administrator as well as executing a service mgmt-vmware restart and service vmware-vpxa restart on each host in the cluster and then restarting the VirtualCenter Service... Same. There is some kind of permissions problem or somethign else is jacked up it seems... ;-\ Don't you love cleaning up other peoples messes...

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

As someone was in there playing with the files using ssh, verify the permissions on the files in the VMs directory

Find the path to the VM using:

$ vmware-cmd -l

Then list the permissions of the files in the directory:

$ ls -lh /%path_to_vm_dir%/*

The .vmx file should be 755 ( rwxr-xr-x ) and the .vmdk files should be 600 ( rw------- )

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

Have you tried logging into the HOST that this VM is orphaned on to see it can be removed from inventory?

Also, try disconnecting the host and then removing it from VC. Then add it back in, that may help refresh that orphaned VM.

Reply
0 Kudos
Chamon
Commander
Commander
Jump to solution

Is there anything left in /vmfs/volumes/LUN/ for the VMs that were deleted?

Is the directory there or any files from the VMs?

Reply
0 Kudos
lhedrick
Enthusiast
Enthusiast
Jump to solution

>Is there anything left in /vmfs/volumes/LUN/ for the VMs that were deleted?

>Is the directory there or any files from the VMs?

Nope they are completely deleted.

Reply
0 Kudos
lhedrick
Enthusiast
Enthusiast
Jump to solution

>Have you tried logging into the HOST that this VM is orphaned on to see it can be removed from inventory?

It does not show up on the host. They are deleted - they are stuck in the VC database... I also do not know what else the guy that deleted these may have done to permissions...

>Also, try disconnecting the host and then removing it from VC. Then add it back in, that may help refresh that orphaned VM.

I am in the process of cabling up four new ESX hosts and I was goign to try that when I had some more breathing room...

Reply
0 Kudos
Chamon
Commander
Commander
Jump to solution

Can you bounce the VC?

Reply
0 Kudos
sdquirra
Contributor
Contributor
Jump to solution

It's late (06/2009), but today i encountered the same error with View Composer and i solved unprotecting the containing folder .

i post the solution for the next unluky sysadmin

start->run->cmd

cd "C:\Program Files\VMware\VMware View Composer"

SviConfig -operation=UnprotectEntity -VcUrl=https://vc01/sdk -Username=adm-user -Password=adm-password -InventoryPath="/Datacenter01/vm/tbd" -Recursive=True

then you can delete

hope this helps

Reply
0 Kudos