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

About these ads

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

6 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 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: