Sunday, May 24, 2015

VMware workstation / windows7 / shared folder woes.


I know that this blog gets zero traffic, but I'm going to write this up here (very quick and raw, unpolished) and maybe others can find this when searching for a solution to this pesky problem (very strange behavior with *some* software accessing files on a drive shared from host (ubuntu linux) to guest (windows 7 in my case) using vmware workstation).   If you're having that problem... read on below...     I don't have the root cause for the problem, if anyone does know what specifically is broken, please let me know....




Preface and a setup...  The move to Linux

July of 2014 I switched over to running Ubuntu Linux as my main OS.   I run it on three main computers and they are all setup pretty much identically.  Generally this has been a great experience. The issue of course is that my primary speciality is analog/RF/microwave circuit design and most of the tools I depend on are only supported well on windows (if supported on linux, it is only officially supported for enterprise linux (RedHat / CentOS -- which is OK but can be painful in many areas -- I could go on and on about that)).  

For many years I've run virtual machines on my macbooks with good success (both parallels and VMware products).    This was going smoothly on Ubuntu with VMware workstation as well until recently.  I don't know what changed.... but something seems to have.

My philosophy with Virtual Machine's is to keep them as slim as possible -- only install the necessary items to make them comfortable to work with.   Any working files, if at all possible, should just live on the host machine and be mapped in.    As I've written about before, I also like to keep working files in Dropbox sync'd folders to keep everything up to date.

The problem I've seen (whether a vmware problem or windows problem -- who knows)....

It seems that the suggested practice of mapping \\vmware-host\shared_folder to a drive letter on the windows machine causes problems in some scenarios.   Two cases have caused problems for me:

1) Keysight Genesys executing a Sonnet EM analysis:  Sonnet couldn't create directories when operating in the shared drive, so the analysis fails.   Moving the whole set of files to the C:\ drive that is part of the VM works fine.

2) Cadence Orcad Capture (16.6) "could not find" (their error message) the files.  If the files are moved the C:\ drive of the VM all works as expected.   Opening a schematic .dsn file simply does not work and generates multiple errors about how it can't find the file at a given path (yet go to that path and it is there).


The work-around that has worked to solve both of these examples is to make the same folder that you share from the host (possibly using the vmware shared folder settings) available as a samba share on the host machine (i.e. map it in like you map a drive from your network from a server or other machine).   If you don't know samba there are a lot of good resources out there, I'm no expert.

So now I map \\machine_name\samba_shared_folder_name to the same drive letter and it works fine

The frustrating part of this is that a whole lot of software works just fine under the configuration that breaks these two examples.  Navigating the mapped drive using windows explorer, a command shell, all that stuff is well behaved.   I am not blaming these vendors in any way -- It probably is not their fault, but I'm guessing they're doing the file access in a similar way...

YMMV!


I have no idea if this problem exists on apple hosts or on other linux systems, but this is what was driving me crazy recently so here it is ...

The inspiration to try this drive mapping came from a colleague -- since he mentioned that he had no problem working with files from network drives (he wasn't ever seeing any problems, but he was running on a mac rather than linux host).  So thanks Rick!

Lance

p.s. minor edit:   One glitch with this "sharing via network" approach is that the share becomes temporarily unavailable when a network change occurs (wired to wireless for instance) -- I tested this on my laptop just now... need to study this further....