Page 1 of 1

Shared Folders slow the first time opened then OK

Posted: 23. Jun 2010, 21:22
by andre-CA
Mac OS X 10.6.4 Host VB all releases (3.1 and 3.2 series). Windows XP Pro SP3 guest and Windows 7 guest. When I open my shared folder the first time after I start a VM it takes about a minute to open the folder. If I close and reopen it opens right away. The same time lag happens on the first read or write of a file if the shared folder is not opened first. Why is this, and is there a way to fix it?

Re: Shared Folders slow the first time opened then OK

Posted: 23. Jun 2010, 21:29
by Perryg
Windows is reading all of the file information. The more you have in the shared folder the longer it will take when you start. Test it yourself by sharing a folder that only has a small amount of data. It should load fairly fast.

Re: Shared Folders slow the first time opened then OK

Posted: 23. Jun 2010, 22:12
by andre-CA
The shared folder has only a few small files in them. A couple of word small text files. Interestingly it only happens on the first open after VM start. Subsequent opens are fine.

Re: Shared Folders slow the first time opened then OK

Posted: 11. Jul 2010, 21:53
by andre-CA
I still have this problem in VB 3.2.6.

Re: Shared Folders slow the first time opened then OK

Posted: 12. Jul 2010, 22:01
by Sasquatch
Add the following to your hosts file (windows\system32\drivers\etc) and it should go faster:

Code: Select all

127.0.0.1        vboxsrv
Windows is trying to look up the name 'vboxsrv' and will only continue when it found it. Since the name isn't found in the hosts file, nor through DNS requests, it takes a while before the GA kick in with the location. Pointing the name to localhost will speed this up.

Re: Shared Folders slow the first time opened then OK

Posted: 13. Jul 2010, 22:05
by andre-CA
There was already a line in the hosts file as follows:
127.0.0.1 localhost
so I added the line you suggested. Then I restarted and it still is much slower the first time the share is opened. It may be slightly faster than without the the line you suggested. I added it after the the localhost line and I left that in so the file now has 2 lines below the comments:

127.0.0.1 localhost
127.0.0.1 voboxsvr

Any other thoughts on this? Thanks.

Re: Shared Folders slow the first time opened then OK

Posted: 13. Jul 2010, 22:08
by Sasquatch
I hope you used 'vboxsrv' instead of what you just wrote. Another entry with 'vboxsvr' may also be added, in case you use that name too (note the location of the v and r, they switched).

If you think it gives too much problems than it solves, you can of course remove the additions to your hosts file.

Re: Shared Folders slow the first time opened then OK

Posted: 13. Jul 2010, 22:18
by fixedwheel
Sasquatch wrote:Add the following to your hosts file (windows\system32\drivers\etc) and it should go faster:
according to the manual its the lmhosts file to be modified ... => http://www.virtualbox.org/manual/ch12.html#id2655966

Re: Shared Folders slow the first time opened then OK

Posted: 13. Jul 2010, 23:27
by andre-CA
Here are the exact lines (i copied and pasted) from the hosts file:
127.0.0.1 localhost
127.0.0.1 vboxsrv

I also tried the suggestion for the lmhosts file and neither seems to change the approx. 20 second delay only the first time I open the shared folder. The next time it only takes about a second.

Any other thoughts?

Thanks.