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

~ by frankooh on 2011-01-21T14:39:29+01:00.

8 Responses to “vboxsf and small files”

  1. Thx. Make my day!

  2. 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.

  3. 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

  4. Thanks! I had also the problem (Win7 host, openSUSE 12.1 guest) and could fix it thanks to this posting. :)

  5. 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…

  6. […] vboxsf and small files […]

  7. […] vboxsf and small files […]

  8. 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

Leave a reply to File Access Bug in LAMP Virtual Machine | nickbair.net Cancel reply