2009-01-20

Mounting Shared Folder in VirtualBox - Linux Host With Linux Guest

i am using VirtualBox to run a Linux guest virtual machine in a Linux host (both Ubuntu Intrepid Ibex), and utilise VirtualBox's shared folder to copy files between host and guest.

Sometimes, i would get the following error message when trying to mount the shared folder in the guest machine:

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

Searching on Google for the cause and solution led me to a few suggestions:

1. The kernel module may have not been loaded - try doing a modprobe vboxvfs.
2. The folder name in the guest machine cannot contain upper case letters (e.g. /mnt/Share).
3. The folder name in the guest machine cannot contain a dash (e.g. /mnt/sh-are).

After some experimentation, i may have found the solution (or perhaps "workaround" sounds more appropriate), and hopefully help others facing the same issue. i have to add though, that i am using Ubuntu 8.10 guest on Ubuntu 8.10 host, so am unaware if the same solution works for other combinations. Also, though those suggestions above did not work for me, one of them may just do the trick for people in slightly different situations (different combination or different root cause perhaps).

First, responses to the three suggestions above:

1. Doing modprobe vboxvfs did not work for me. i still faced the very same error message after that. In my case, the kernel module most probably has already been loaded beforehand.
2. The folder name i am using does not contain any upper case letters. In any case, after using the workaround (to be described below), i tried and can use upper case letters without problem.
3. Same findings as suggestion (2).

Now, the solution (or workaround) i found is that the mount command cannot be issued in the folder that contains the shared folder itself. For example, if the shared folder is /mnt/share, the mount command cannot be issued from the /mnt folder (even if the full path is provided i.e. sudo mount -t vboxsf share /mnt/share). Another example, if the shared folder is /share, the command can be issued from any working directory except for /.

Strange, but this finding works for me, and i hope you will find it useful as well.

2009-01-07

My Conky Configuration

i have just discovered Conky. It is an elegant, unintrusive, lightweight, yet powerful system monitoring application that can just sit in the background of your desktop. i use it to display the current time, weather conditions, as well as various system statistics.

In this post, i shall share my Conky configuration, and hope that it will be helful to get you started on this tool.

First, a screenshot of Conky on my desktop:



One thing to add is that, besides the standard Conky variables, i also make use of the conkyForecast python script to display the current weather information. Basically, i use the execpi call to periodically execute the python script and obtain an output based on the conkyForecast template file. The output is then parsed by Conky and displayed along with all the other information.

Here are the various configuration files that i used:
    .conkyrc - the main Conky configuration file
    .conkyForecast.config - configuration file for conkyForecast
    .conkyForecast.template - conkyForecast template file, for formatting the weather section

Have fun experimenting with Conky!