Link to home
Start Free TrialLog in
Avatar of theoclark
theoclarkFlag for United States of America

asked on

Windows 7 Mapped Drives Keep Disconnecting

I have a mixed office (both Mac and PC) of computers that all connect to a Windows 2003 R2 Server. The server is hosted in a VMware ESXi environment, but is visible on the network as are the other Virtual Servers. Now the Mac OS X machines have no problem connecting to the server, while the Windows 7 machines connect and then after a period of time they go from green to a red X. If you click on the drive it will give you an error message that the network path could not be found. We've then disconnected the drive, re-mapped and in some cases it won't let us do that even if we use the server's IP address.

We've already tried this; http://support.microsoft.com/kb/297684 but it didn't fix anything. We've run this actually on the Windows 7 machines and the Windows 2003 Server R2 but nothing has changed.

We can ping the server from the command prompt but the computers name, fully qualified domain name, and IP address.

There seems to be a time related issue with this since with the Windows 7 computers at times things will be fine and then an hour later it the Red X appears.

I've also changed the network adapter to disable the IPv 6 and changed the Network adapter to not "allow the computer to turn off this device to save power" in device manager.

At this point we can't consistently ensure that staff will be able to maintain their connection to the shared drives in the office. We've been dealing with this for the last week and can't tell if the issue is just Windows 7 (as it appears), the Server, VMware, or something with the network adapters.

Help would be very much appreciated, we're running out of options of things to try.
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you checked your network utilization for the virtual machines, and the ESXi host server?
Avatar of theoclark

ASKER

How do I check that from the vSphere client?
Can you check on your clients to see if you have Event 2017/2021 that indicates the failure in allocation non-paged pool in Event Viewer?
you may try to increase the amount of non-paged pool and check how everything works:


NAME: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\MaxNonpagedMemoryUsage
VALUE: 0xFFFFFFFF
If the key does not exist, please create it and set the value.
ghairallah
 
Do I need to check this on the Windows 7 Clients, the Windows 2003 server, or both?
Check it on your Windows 7 clients.
This could be a timekeeping issue - sometimes you get some clock drift in a vm and causes authentication problems in a domain. Make sure VMware tools are installed in your virtual machine - and take a look at http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1318 for some best practices.
ASKER CERTIFIED SOLUTION
Avatar of bgoering
bgoering
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
He already tried the net config server /autodisconnect:-1 and that didn't work for him.

The time discrepancy may be a problem.
are your VMware hosts, and all your server pointing to the same NTP server?
bgoering  when I run the command as you typed it, I get

 "The syntax of the command is:
 NET CONFIG
 [Server : Workstation]

So I take it I should be doing: NET CONFIG myserver's/workstations's name /autodisconnect:-1 ?

When I try that I get the same message as above, what am I doing wrong?
No, the command should run as i posted it. You do have to run it from an administrator cmd prompt (right click and run as administrator) - I did neglect to mention that.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Bgoering

I was able to run the command successfully. Restarted. User Loged on, and we remapped her drives. We waited for about 5 minutes and then the drives disconnected again.

The odd thing is that if you select a drive the drive changes from red x to green, to red, back and forth.. til eventually we get the message.

An error occurred while reconnecting M: to  \\servername\share Microsoft Windows Network: The local device name is already in use. This connection has not been restored.

Any other suggestions?
Have you looked into MaxNonpagedMemoryUsage ?
Also, I know that sometimes if a share is mapped, or rather, has a kerberos ticket with the client, but isn't mapped to a a drive letter, that would prevent any drive letter from mapping, with a similar error that you are getting.

When you get the "Local device name is already in use" , can you do a:
net use
on the command prompt, and see if anything is somehow still mapped?

Also try the same command on the server side, it did seem to me that entering that on the workstation side wouldn't do much, but that was what my research indicated one should do to disable the behavior.

I believe it is the workstation service (not the server service) that is in use on the workstation to manage mapped drives.

That command is also available on Windows 2003
Also after getting the "connection has not been restored" message I browsed the network to the server, but when I click on I get:
network error
Windows cannot acces "servername"
You need to check the spelling of the name. Otherwise, there might be a problem with your network.  To try and identify and resolve network  problems, click Diagnose."

I click diagnose and it tells me.

The remote device or resource won't accept the connection.

So I wrote this powt, then went back to Windows Explorer just to see, and yes all the drives are disconnected and I clicked on one of them it connected immediately as if it had never been disconnected. I click the rest of the "disconnected" drives all are working fine and go from red x to green. Why does this work at some points and at other points it doesn't even see the server.




That brings me back to the possible time drift occuring in your vm. That would certainly explain the symptoms if it drifts to far away from workstation time, then updates and that brings it back in line.

Look at the event logs on the server and on the client (especially the security log) and see if you have any failure messages on authentication, and if so what the reason code is.
Look for event log errors in the 8000's on your domain controller that say something like:

"XXXcomputer thinks it's a domain ,master browser, the browser service has stopped and an election has been forced"
I had a similar issue back in my desktop support days.  We ended up not being able to resolve the issue.  We had XP, Vista, and 7 clients in our network along with SBS Server 2003.  We didn't notice this starting to happen until we added Vista and 7 clients.  The work around I came up with was to write a script/batch file specific to each user (username/password), name it "remap network drives", and placed it on each user's desktop and sent out a memo stating that if they were having issues with connecting to mapped network drives, to run (double click) the item on their desktop named "remap network drives".  So, in order to teach you how to do this, I'll first teach you the command line commands for doing this.

First and foremost, you want to disconnect/delete all network drives:

"net use N: /delete"    (this is an example for removing drive letter N:)

Mapping a network drive from cmd line:

"net use N: /persistent:yes \\servername\share /u:domainaccount password" (example for mapping drive letter N:, persistent, using domain authentication)

Now that we've covered the basics, you may want to write up a script/batch file to do this.  So, we will use the N: (you can do multiple drives within the same script/batch file).  You will open up notepad (right click the desktop > select "new"> click text document   OR  start> all programs> accessories> notepad).  Now you will put this, exactly like this, into the notepad:

net use N: /delete

net use N: /persistent:yes \\servername\share /u:domainaccount password


Now when you go to save the document, go to file> save as.  Where it says "save as type" change that to "all files".  Now name your file as desired, but add a .bat at the end (for batch file).  So for example "re-map_network_drives.bat".  This will create a "batch file" on the desktop.  Now you can double click the file batch file and it will delete the mapped drive(s) that you have instructed it to in the file, and it will also re-map them with network authentication.  I suggest saving a txt file template that way you aren't having to re-type the whole thing over again, only having to change the authentication information according to each user.  If you aren't able to find a permanent solution, this is a great work around.  It is what we ended up using.  I hope that this helps you out!

-Alakai81
I actually think that I've found a more permanent answer for you.  It says it's for windows Vista, but it's actually for any O/S that has UAC.  Please refer to the following link:

http://windowsconnected.com/blogs/joshs_blog/archive/2007/02/20/windows-vista-tip-enabledlinkedconnections.aspx

This involves adding a registry key.  To do so: start> (in the run box type) regedit.

This will bring up the registry editor, drill down to the location it spesifies in the link and insert the registry entry.  Save it, and restart.  This should work (as reflected by the comments of users in the link).  Let me know!  Good luck!


TEXT FROM THE LINK:

On Windows Vista (or any O/S utilizing UAC/User Account Control/Elevated rights/privlidges) when you map a drive under your admin account you will find that your mapped drive is not available after you switch to your full token via a RunAs or Consent dialog. This is by design because there are actually two tokens in play here. What happens is the LSA recognized that you are admin at logon and creates two logons. The first with a "filtered" token or non-admin which is used to render your desktop and the other containing your full token to be available after consent dialogs.

Because there are two separate logons there are separate logon ID's.  When network shares are mapped they are linked to the current logon session for the current process token. Meaning you don't have access to the network drive from the alternate logon. This can come into play with logon scripts and a number of other areas where you may require access to a network share from both tokens.

If you set the following key it will change how SMB shares are mapped. They will be mapped to a token, which means that LSA will check to see if there is a linked token associated with the user session and add the network share to that location as well. Basically all of this means that after setting this drives will be accessible from both tokens no matter which they are mapped under.

Disclaimer: This is not supported by Microsoft and was never tested. Use at your own risk.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
EnableLinkedConnections = 1 (DWord)

END TEXT FROM LINK.


-Alakai81
We found out that this problem wasn't with Windows 7, but a network attached camera that was using the same IP address of the server. It wouldn't show up in network scans, and wouldn't respond to pings but none the less had created the network conflict.

Thanks to those of you for your suggestions.
@THEOCLARK:

Roger that.  Glad to hear that you were able to diagnose/fix your own issue.  Frustrating that it was that simple eh? =)  Wishing you luck in your future I.T. ventures.  If you have any future issues/questions, come back and ask us here at experts-exchange!

-alakai81
Because the original question was incorrect in that the problem wasn't with Windows 7 at all, but due to a network attached printer.