Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to remove some VMWare images that were created by a machine that is no longer available. We do not plan to use VMWare and would like to clear up the space.

I get a message Cannot delete [filename]... for all of the files in these directories.

Can anyone tell me how to delete them (short of reformatting)?

Thanks

-- edit --
The OS is Windows and the only machine that used the images isn't on the network any more. Process Explorer is showing no processes accessing the files.

-- edit --
From the command prompt removed the system attribute and was able to delete the drive files, but still cannot remove the configuration files. WTF? Anyway, I got most of the space back.

share|improve this question
1  
Host operating system? –  kmarsh May 6 '10 at 20:35
add comment

3 Answers

up vote 1 down vote accepted

Ensure that both the files and the directories are not read only. Don't rely on the Windows Explorer properties page for that, as it has a bug that has existed since Windows 95. Turn on the attributes column instead.

If you're sure VMware isn't running and the files are not read only install unlocker and use that to delete them.

share|improve this answer
    
During the weekend's maintenance window we isolated the servers from the rest of the network and were able to delete the files. Points for pointing out unlocker. –  Brad Bruce May 13 '10 at 0:30
add comment

Most likely the files are in use. Is VMWare still running them?

share|improve this answer
    
Shut down the VMWare service and try again. –  Chris Nava May 6 '10 at 21:07
add comment

On linux run lsof to see what process is access. Linux does not actually delete a file until all processes that are accessing it are no longer running.

On windows use process explorer (sysinternals.microsoft.com) to see what process is accessing those files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.