vboxsf and small files
i am using a virtual machine (vbox) as a webserver and connect both via shared folders, so i do not need to set up smb/nfs/sshfs or anything else. that way i can work with my ide on the webserver, but do not have one installed on my laptop. but there seems to be a problem with small files (about 2KB), e.g. .css-files. the apache delivers after small changes a css file, but not the modifed one. it is an old version with the same length of the new, although the length is like the new one and the timestamp is also renewed. so if your new .css-file is smaller then the old one, it has a padding of zeros. there is a workaround to add EnableSendfile Off and EnableMMAP Off into the apache.conf.
source:
http://forums.virtualbox.org/viewtopic.php?f=3&t=33201
http://www.virtualbox.org/ticket/819
Thx. Make my day!
Jakob Berlin said this on 2011-10-26T08:56:35+01:00 at 2011-10-26T08:56:35+01:00 |
Thanks a ton! Just so Google indexes this, adding “EnableSendfile Off” and “EnableMMAP Off” to apache.conf fixed a problem where apache wouldn’t serve large binary files (movies) out of vboxsf. VirtualBox error in syslog was:
Dec 31 16:01:45 kernel: [ 166.959416] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
Dec 31 16:01:45 kernel: [ 166.959558] VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.
Jeff Ward said this on 2012-01-01T00:15:57+01:00 at 2012-01-01T00:15:57+01:00 |
Thanks for the clearly explained fix; I wish I found this hours ago.
Host: Windows 7
Guest : Fedora 16
Kernel: 3.2.7
VirtualBox 4.1.8
apache, shared folders, vboxsf, .css, .js, small files, 0 bytes, guest additions
EnableSendfile Off
EnableMMAP Off
Ed Hopper said this on 2012-02-24T04:49:39+01:00 at 2012-02-24T04:49:39+01:00 |
Thanks! I had also the problem (Win7 host, openSUSE 12.1 guest) and could fix it thanks to this posting. :)
Malocher said this on 2012-08-20T18:01:34+01:00 at 2012-08-20T18:01:34+01:00 |
Thank you sooo much, it was very useful! I couldn’t figure out why even restarting apache, after making a change to a CSS file (my document-root is in a VBOX shared folder), the apache was still serving the old version of the CSS file, event if “cat filename.css” from shell was showing the correct version…
Dmitri said this on 2013-02-15T13:32:33+01:00 at 2013-02-15T13:32:33+01:00 |
[…] vboxsf and small files […]
File Access Bug in LAMP Virtual Machine « $ cat /dev/blog said this on 2013-07-08T13:28:06+01:00 at 2013-07-08T13:28:06+01:00 |
[…] vboxsf and small files […]
File Access Bug in LAMP Virtual Machine | nickbair.net said this on 2015-04-06T04:58:37+01:00 at 2015-04-06T04:58:37+01:00 |
Wow, thanks, I spend many time (months) before solved…
vbox 5, yosemite host, centOS 7 guest…
read my post and reply by forum of vbox:
https://forums.virtualbox.org/viewtopic.php?f=8&t=73785&p=345788#p345788
You are my hero :-)
thanks a lot
oscaroxyy said this on 2015-11-18T13:03:56+01:00 at 2015-11-18T13:03:56+01:00 |