I recently deleted a VM with a large (1.4TB) VMDK file attached. When I checked the datastore a few weeks later a there was still a "vmname-flat.vmdk" file left over. However when I tried to delete it via the vSphere client I got an error saying "cannot delete file [DATASTORE_NAME] vmname-flat.vmdk". I connected to an ESXi host in the cluster and tried to delete it from there. Running "rm vmname-flat.vmdk" resulted in the error:
"rm: can't remove 'vmname-flat.vmdk': Bad address"
At the same time the following event was logged in vmkernel.log:
"2015-08-27T11:09:02.904Z cpu7:18223819)Fil3: 8848: Truncating <FD c157 r32> failed: Invalid address"
I have tried from a few different ESXi hosts, all with the same result. running lsof shows that the file is not locked by any process.
How can I delete this file?