VMware Cloud Community
tbilir
Contributor
Contributor

Unable to delete VM from datastore

Hi,

I am unable to remove a vm that has been removed from inventory.

I have tried the following:

Turning off all 4 esx hosts that we have, and tried removing the folder, via vspehere host,WinSCP,Putty(SSH).

doing the service mgmt-vmware restart command on all esx hosts, and tried removing the folder, via vspehere host,WinSCP,Putty(SSH).

there are no .lck files in the directory

doing a vmware-cmd -l shows me that the vm is running nowhere

tried vmkfstools which resulted in the following:

# vmkfstools -L release /vmfs/volumes/476a3036-293acd65-f2e4-0015c5f8b86b/VM-TYCHE/ORGVM-TYCHE-000001-delta.vmdk

Could not open /vmfs/volumes/476a3036-293acd65-f2e4-0015c5f8b86b/VM-TYCHE/ORGVM-TYCHE-000001-delta.vmdk

Command release failed

Error: Invalid argument

a ls -ahl gives me this:

drwxrwxrwx 1 root root 1.4K Jul 7 14:18 VM-TYCHE

the VM-TYCHE is lit up in background color green in putty, whilst all other vm's do not, anyone know why?

and in the folder VM-TYCHE it looks as following:

drwxrwxrwx 1 root root 1.4K Jul 7 14:18 .

drwxr-xr-t 1 root root 3.3K Jul 7 00:05 ..

-rw------- 1 root root 3.0G Jan 29 2009 ORGVM-TYCHE-000001-delta.vmdk

-rw------- 1 root root 11G Jul 2 12:46 ORGVM-TYCHE-000002-delta.vmdk

-rw------- 1 root root 4.4G Jul 2 12:42 ORGVM-TYCHE_2-flat.vmdk

-rw------- 1 root root 0 Jun 28 22:30 ORGVM-TYCHE-4d1644da.vswp

-rw------- 1 root root 15G Jan 29 2009 VM-TYCHE-flat.vmdk

-rw------- 1 root root 8.5K Jul 2 12:34 VM-TYCHE.nvram

-rw-rr 1 root root 2.9K Jun 28 22:36 VM-TYCHE.vmx

-rw-rr 1 root root 108K Jul 2 12:42 vmware.log

trying to remove the files gives me this error:

# rm -f -r -d VM-TYCHE

rm: cannot remove `VM-TYCHE/VM-TYCHE.nvram': Invalid argument

rm: cannot remove `VM-TYCHE/ORGVM-TYCHE-000001-delta.vmdk': Invalid argument

rm: cannot remove `VM-TYCHE/vmware.log': Invalid argument

rm: cannot remove `VM-TYCHE/ORGVM-TYCHE_2-flat.vmdk': Invalid argument

rm: cannot remove `VM-TYCHE/ORGVM-TYCHE-000002-delta.vmdk': Invalid argument

rm: cannot remove `VM-TYCHE/VM-TYCHE.vmx': Invalid argument

rm: cannot remove `VM-TYCHE/VM-TYCHE-flat.vmdk': Invalid argument

rm: cannot remove `VM-TYCHE/ORGVM-TYCHE-4d1644da.vswp': Invalid argument

I also pretty much followed every step in this KB but with no solution:

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

As for how this happened, our MD3000i+MD1000i (iscsi) crashed, so this also means the SAN server has been rebooted.

Can anyone shed any light on the matter?

0 Kudos
0 Replies