Slow speed with shared folders in VirtualBox

9

4

I'm using VirtualBox 3 on my Ubuntu 9.04 desktop, and I've got a VM with Windows XP sp3 mapping my ~/Documents folder as a shared folder. The virtualised Windows is mapping My Documents to the shared folder directly (//vboxsvr/Documents).

The problem is that every time that I'm interacting with the shared folder (i.e.: access, list files, etc.) it takes several seconds to do so.

Is there a way to speed this up?

voyager

Posted 2009-07-21T21:20:17.900

Reputation: 2 490

I think it is only slow in listing. Writing and reading are not slow. – bert – 2009-11-18T20:35:11.247

I have the exact same problem with an XP Host and both an Ubuntu guest and XP guest. Must be a VirtualBox thing (versus an O/S thing). I'd be interested in seeing a solution. – Michael Todd – 2009-07-21T22:41:33.837

Answers

7

It seems to be an issue with name resolution. That happens on Windows machines while it tries to use the virtual network adapter to resolve the name. I have resolved this issue on a Windows host, but not on an Ubuntu host.

I found this site that has some suggestions:

In C:\WINDOWS\system32\drivers\etc\hosts change the line

127.0.0.1       localhost

by appending Vboxsvr and your computer name
so for a computer named the_box it would become

127.0.0.1       localhost Vboxsvr the_box

Chris Thompson

Posted 2009-07-21T21:20:17.900

Reputation: 4 765

Yes that is what I did, edited the abovementioned file in the Windows guest. Also edited lmhosts to include 255.255.255.255 VBOXSVR #PRE 255.255.255.255 VBOXSRV #PRE as I have seen in official VirtualBox documentation. Performance still very poor when using the shared folder in a Windows 10 guest on Ubuntu host (operations using the guest’s native disk are fine). – Jesse Glick – 2017-06-22T18:19:52.660

See https://www.virtualbox.org/manual/ch12.html#idm11324 by the way.

– Jesse Glick – 2018-09-22T04:31:11.487

Already saw the linked-to site but it did not help me... editing \etc\hosts has no effect on speed, and anyway my share is already mounted as a drive letter, but access to it is still far slower than local disk. 4.1.2 guest additions. – Jesse Glick – 2012-05-08T15:34:19.687

My understanding was that the hosts file fix was only for Windows guests (in fact the hosts file has to be changed in the guest, not the host) since their shares are mounted as network drives. – Codebling – 2012-08-27T21:26:23.327