I make a lot of use from VMWare Workstation's Shared Folders feature: You set a folder on host machine as shared for guest OS, and you can access it on guest, in similar way as a SMB share (read-only or read-write).

The thing that annoys me is that after copying a couple of files from hots to guest, Workstation locks these files from writing, even if the share is set as read-only.

This is especially annoying in often scenario when I'm trying to debug/use a script on guest while I'm still editing it on host.

So far the only ways I know how to make Workstation release these files are:

  • suspending the guest machine: that's a terrible pseudo-workaround. It's slow (especially with higher amount of guest RAM) and sometimes the interruption may not be welcome
  • copying amount of some random other files, hoping that Workstation has an internal limit on amount of files it would lock: such hack that might useful regularly only if we knew the amount ant it was small

So what are some good ways to make Workstation release those files?

Or alternatively, how to avoid locking them in the first place?

Edit: I did not make few things clear:

  • I know that it's Workstation (vmware-vmx.exe) that is locking these files (probably due to some internal buffering)

  • I don't want to release the files by force. I tried that, but releasing them by force makes machine unstable, which I cannot afford

Apparently this is caused by a bug in Workstation.

  • Why not just configure real network file sharing? – jftuga May 3 '12 at 12:59
  • @jftuga I strongly prefer SF and have everything that way for a number of reasons, some of them being: it's way faster; it does not need network. See this post – Alois Mahdal May 3 '12 at 13:03
  • Problem continues to exist in Workstation 11 and shared folders between two win7 guests. The file created by one guest gets locked for all systems including the host if another guest uses the file. The only thing that works for me is, go to the guest that created the file, disable that shared folder and then reenable. And the steps are painful because there is no toolbar customization to quickly get to the shared folder settings page. Or is there? – user173399 May 28 '16 at 4:14
  • Note that this problem still persists in Workstation 12.5. In my case the VM just read a file for attachment to an e-mail & even after the e-mail program was closed, Workstation held a file lock open on it that Unlocker couldn't see or remove. – Mark Booth Oct 5 '16 at 8:25

This appears to be a bug in VMWare, so there is no need to check a 3-rd party antiviral software or use unlockers - all the latter break normal functioning of VMWare Workstation itself.

Multiple threads on the VMWare forum addresses the same problem. For example:

The only solution which works is mentioned in the posts by Loren Pechtel, so all credits should go to her: you should access ("touch") the locked file from the guest system.

For example, I open and close the locked file properties from Windows Explorer in the guest. This is enough to drop the lock in the host.

| improve this answer | |

I ran into the same problem using a script to copy files from a shared host folder to my client. Ended up with locked files on the host. The easiest way to get around this is to do as others have posted before, access the host file from the client using a command.

For me I used "attrib -r HOST_FILE" in my script after copying host file. Since I mounted my shared folder as read only this did nothing but DID clear the lock.

| improve this answer | |

Some ideas :

  1. Check if any program (such as an antivirus) is reading the files, on both host and guest.
    I normally use Unlocker or Process Explorer for that.
  2. Check if the files are not just copying very very slowly.
    This could be the guest having a problematic network driver.
  3. Try to turn off all firewalls, antivirus or other security products.
  4. I am more than half-way convinced of a serious bug existing in the VMware implementation of shared folders, where host and guest can get utterly confused. I usually avoid shared folders, because it is impossible to guess in advance whether they will work reliably on any new configuration, while network or FTP shares always work.
| improve this answer | |
  • Thanks for suggestions. 1. Yes, vmware-vmx.exe is usually blocking these files, but I can't use force for unlocking--I've tried but it made Workstation unstable. 2. Checked--it's not the case. It typically happens to me with one small file which I can see is complete. 3. Tried, did not help. 4. Yes, this is a bug so in fact I'm looking for a workaround. – Alois Mahdal Jun 4 '12 at 7:14
  • And, regarding avoiding SF: It has proved for me for almost two years of daily testing that of all solutions, SF are the most reliable (and fastest) one. The most significant reason for that is that they actually do not depend on network: you can have restrictive firewalls, broken driver, or zero NICs on guest, and still transfer files as you wish via SF. – Alois Mahdal Jun 4 '12 at 7:18
  • No problems in 2 years? What luck! Most of my SF never worked or were too slow to be usable, and the same as you are seeing now, for no obvious reason. The only suggestion I have left is to use the latest VMware version and of VMware tools (reinstall even if up-to-date, just in case), then delete and recreate the SF. Sometimes this helps. But if it doesn't, then the only next step I can see is to contact VMware Support. – harrymc Jun 4 '12 at 11:48
  • Irony: shortly after my comment about SF reliability, I upgraded to Workstation 8 and started having problems: everything would timeout on \\vmware-host\Shared Folders\folder\subfolder unless \\vmware-host\Shared Folders\folder has been opened at least once since boot. I'm not working in that company (and probably not going to see Windows for a long time, yay), though... – Alois Mahdal Mar 15 '13 at 20:08
  • When this happened to me with Workstation 12.5 Unlocker couldn't see or remove any file locks on the file. I never saw this problem with Workstation 7. – Mark Booth Oct 5 '16 at 8:29
  1. you can try to use Unlocker Software (click to download unlocker)

    Install Unlocker, disabling the option for Explorer extensions and other junk

  2. open CMD, than navigate to C:\Program Files\Unlocker.

  3. run Unlocker.exe "the-path-to-the-locked-folder", from CMD.

  4. a pop up confirming the lock release, than click unlock to unlock the file.

  5. Finish, File has been unlocked,
| improve this answer | |
  • Sorry, I'd like to avoid using "ad-supported" software (sounds almost like ad-ware). (I already have Process Explorer for these things.) – Alois Mahdal Jun 4 '12 at 7:31
  • @AloisMahdal It may just be referring to the bundling of toolbars with the installer (which you should deselect when installing). In any case, I personally prefer the official/developer's site for software downloads, not sites like Softpedia. Of course, Process Explorer works just as well and you have already stated forcibly closing those handles cause instability. – Bob Jun 4 '12 at 8:22

Emco unlocker (freeware - no Ads) works fine. After transfering files, just send the folder (where you copied or moved your files to on your host) to Emco file unlocker. I placed a shortcut in my "send to" folder. Fast and effecient.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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