Oct 082009
 

I’m thankful to work in one of the most Linux dominated fields in the industry. But the rest of the world still uses Windows all over the place, so I do have to use it as part of my job. I recently made my life much better by installing Windows under Ubuntu Linux using VMware. Now the couple Windows apps I have to use are relegated to one virtual desktop on my Linux box.

The setup was mostly painless, but I did run across some very frustrating behavior with a couple of the Windows applications.

Both run remotely from a remote Windows server using executables and files provided through a Windows File Share. They started crashing just a few moments after starting – sometimes an error report was generated and other times they just disappeared. It got to the point where they wouldn’t even stay open for a second – the window would just disappear with no warning. (These are exactly the sorts of situations when it’s unbelievably frustrating to use Windows. On Linux, you can dig right into the problem and find out exactly what is causing the failure.)

After a lot of painful trial and error (and Windows reboots), I noticed that the Windows File Share I had mapped as a network drive was disconnecting. I would open My Computer and see that the network drive was unavailable. But as soon as I attempted to access the drive, it would reconnect. It finally dawned on me that NAT network connections and Windows File Sharing do not play nice: I had mounted the share using both Samba on Linux and Windows under VMware. The file server was switching between the Linux and Windows clients because they appeared to be the same client. As soon as I unmounted the drive on Linux, the strange Windows behavior disappeared.

There’s probably a few solutions if you absolutely must have both the host and virtualized OS access a Windows File Share:

  • Use VMware shared directories so that only the host needs to mount the share.
  • Use VMware’s bridged network device to give each OS it’s own network address (for all I know, the Windows server might still be confused).

I’m sure that this behavior is not limited to VMware NAT. Any attempt to mix NAT and Windows File Shares is likely to end badly.

Updated 2009-10-15: I’ve reconfigured VMware to use bridged networking instead of NAT. As far as I can tell, it operates correctly.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(to be displayed above your comment)

(for moderation; your e-mail address will not be made public)