Hello,
We have some files on one of our datastore that we are not able to delete.
If we try to delete them from the Datastore Browser, we get the message "Error caused by file xxx". When when try from command line (ESXi 4 with SSH enabled), we get "rm: cannot remove 'xxx': Invalid argument".
In the hostd.log file we have messages like :
\[2010-06-04 08:20:02.362 358C2B90 error 'App'] Could not load xxx.vmx
\[2010-06-04 08:20:02.364 358C2B90 info 'DiskLib'] DISKLIB-DSCPTR: DescriptorDetermineType: failed to open 'xxx.vmdk': Invalid argument (1602)
\[2010-06-04 08:20:02.364 358C2B90 info 'DiskLib'] DISKLIB-LINK : "xxx.vmdk" : failed to open (Invalid argument).
Any idea how to delete these files ? We tried to reboot our ESX servers and our SAN, but it didn't help...
Thank you !
lbalogh,
If you SSH in and browse the LUN & virtual machine directory, what attributes/permissions do you see on the .VMDK?
Marty
Marty,
here are the attributes of all files of one of the problematic VMs :
/vmfs/volumes/49fb0986-c369d9ea-92f5-00145ebe6018/import_old # ls -ahl
drwxr-xr-x 1 root root 1.4k Jun 4 12:57 .
drwxr-xr-t 1 root root 4.0k Jun 4 13:18 ..
-rw------- 1 root root 512.0M Dec 28 20:55 import-28a8b639.vswp
-rw------- 1 root root 8.0G Dec 29 01:45 import-flat2.vmdk
-rw------- 1 root root 8.5k Dec 28 20:55 import.nvram
-rwxr-xr-x 1 root root 2.3k Dec 28 20:55 import.vmx
-rw-r
r1 root root 43.1k Dec 28 20:58 vmware.log
Note that I can not delete any of these files :
/vmfs/volumes/49fb0986-c369d9ea-92f5-00145ebe6018/import_old # rm import.nvram
rm: cannot remove 'import.nvram': Invalid argument
have you tried to restart the management agents and then try to delete again?
To restart the management agents on ESXi:
1. Connect to the console of your ESXi Server.
2. Press F2 to customize the system.
3. Login as root.
4. Using the Up/Down arrows navigate to Restart Management Agents.
5. Press Enter.
6. Press F11 to restart the services.
7. When the service has been restarted, press Enter.
8. Press Esc to logout of the system.
Troy Clavell,
We already tried to shut down all our ESXi servers and restart our SAN (on which the datastore is), I assume it would do the same thing as you procedure ?
Can you un-register the guest and try to delete the files from the GUI, or SSH?
I don't understand why there's a VSWP file here, (-rw------- 1 root root 512.0M Dec 28 20:55 import-28a8b639.vswp). Do you have a memory reservation in place? (I reckon you've confirmed that puppy isn't running).
And just to chime in on this, I totally agree with Troy. Restarting the management service should be sufficient. Rebooting the host ought not be necessary. And rebooting the SAN? Man, I'd be on the phone with VMware Support before that, even if it's in a lab with minimal use. That suggests some serious potential issues. Your host and SAN should be able to run uninterrupted barring upgrades and hardware failures. Of course, we don't live in a perfect world.