VMware Communities
Micah71381
Contributor
Contributor

VMWare is holding locks on shared files.

Windows Vista x64 host.

Windows Vista x32 guest.

VMWare Workstation 6.5.

Guest has access to one of the host's drives via shared folder which is mapped inside the guest.

On the guest I access a DLL (specifically, add the DLL to the guest's global assembly cache).

On the guest I then remove the DLL from the global assembly cache (which should unlock the file).

On the host I try to delete the file but it fails because the file is in use.

Using Process Explorer I can see that vmware-vmx.exe has an open handle to the DLL in question.

Restart the guest OS (not VMWare, just the guest OS) to ensure that it isn't holding a lock.

Try deleting the file on the host again, still in use by vmware-vmx.exe.

Why does VMWare keep locks on shared files even after the guest OS isn't using them anymore?

Is there a way to release the lock without restarting VMWare Workstation?

0 Kudos
4 Replies
Micah71381
Contributor
Contributor

To half answer my own question, suspending the VM appears to have released the locks. I would still like to know if there is a better way and/or why VMWare does this (perhaps with a hint as how to avoid it).

0 Kudos
Scissor
Virtuoso
Virtuoso

The VMware Shared Folders feature has all sorts of strange behaviors like this. I suggest using Windows file sharing instead so that you can avoid using VMware Shared Folders.

Micah71381
Contributor
Contributor

It didn't cross my mind that I could use normal windows networking instead of the VM folder sharing thing. I've now mapped a network share instead of a VM share, thanks for the tip!

0 Kudos
JohnPeterson
Contributor
Contributor

This post is at https://github.com/mirror/vmware/issues/4 (because of the reason in the topic "post location" at https://github.com/mirror/vmware/issues/1)

0 Kudos