Tips on running Innotek Virtualbox
November 20, 2007
The following are tidbits I have learn while running Virtualbox on various systems.
Running Virtualbox on an Ubuntu Host
There are two issues:
- When you click attempt to open the settings on a virtual machine, you get the following error:
Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.
The cause of this problem is that usbfs is not turned on in Ubuntu. To fix this, you need to edit the file /etc/init.d/mountdevsubfs.sh (remember to use sudo). Search and uncomment out all of the code lines:
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb - Unfortunately, this does not solve the problem entirely. When I attempt to access the USB from the guest, I get the following error message.
Failed to attach the USB device
Even though you enabled usbfs, the user do not have permission to use USB. You can set up a rule to give each user access. Because everyone who use Virtualbox has to be in the group vboxusers. The easiest way to give every Virtualbox user access would be to give vboxusers access. Sudo edit the file /etc/udev/rules.d/40-permissions.rules, locate the following line:
# USB devices (usbfs replacement)
SUBSYSTEM==”usb_device”, MODE=”0664″
Change the line to:
# USB devices (usbfs replacement)
SUBSYSTEM==”usb_device”, GROUP=”vboxusers”, MODE=”0664″
Running Virtualbox on a Mandriva Host
When you install Virtualbox on Mandriva (I am using Virtualbox 1.6.2 on Mandriva 2008.1), it throws an exception when I run the VM:
Virtualbox kernel driver not installed.
This error is encountered if I install the Virtualbox OSE from the Mandriva repository or the Virtualbox rpm from Virtualbox.org (note: the version I am using is for Mandriva 2008.0, a 2008.1 was not available). The problem is that Mandriva needs a kernel package to compile the Virtualbox kernel driver. First, you need to determine what kernel module you are using. On a desktop, you are likely to be using kernel-desktop-devel-latest and on a laptop you are likely to be using kernel-laptop-devel-latest. When you boot up your machine, you can see which one you have in the boot menu. You should install Virtualbox in the following order.
- Install the kernel-desktop-devel-latest or kernel-laptop-devel-latest (depending on whether you have a laptop or desktop). This must be install first because Virtualbox need it to compile a new kernel module.
- Download and install the Mandriva Virtualbox rpm from Virtualbox.org
- Add the users that will use Virtualbox to the group vboxusers.
Installing guest Additions on Suse 10.3
When you try to run the guest addition, you’ll get an error message that you have to install header, source, and gnu c. You need to use YAST to do the following
- Use YAST and add OSS source to the repository list.
- Install the packages gcc, kernel-source, linux-kernel-headers.
After the header, source and compiler is installed, the guest additions seems to work only some of the time. Suse runs the init scripts in parallel and sometimes the vboxadd script end up running after the Xorg.
There are two way to fix this:
- Set RUN_PARALLEL=no in /etc/sysconfig/boot. This may cause a slight delay in runtime.
- You can add a dependency to /etc/init.d/.depend.start so that vboxadd is executed after xorg. To do this, find the line for xdm: and add vboxadd to the end of the line. If you reinstall the guest addition, you may have to do this again.
Shared Folder on a Linux Guest
Virtualbox allow you to pass data between host and guest through a shared folder. The instructions in the manual is not necessary very clear. The manual states that you are suppose to run the following command in a Linux host to mount the shared folder:
mount -t vboxsf [-o OPTIONS] sharename mountpoint
The trouble is that users may not understand what the sharename and mountpoint is and that shared folder under Linux is quirky and weird.
Here’s how it works, in the settings for each machine, you can add a shared folder. The process is fairly intuitive, you click on the add button and select a directory where the share directory will be a sharename is automatically created. This is the share name you will use in the mount command. The mount point is simply a directory that you will mount the share folder to. You will have to do this as root or use sudo. For example:
mount -t vboxsf vshare /home/paulsiu/vshare
The problem is when you tried this, you get the following error:
/sbin/mount.vboxsf: mounting failed with the error: Protocol error
If you look at syslog, you’ll see the following error:
Nov 8 19:28:09 wxbuilder kernel: vboxvfs: sf_glob_alloc: vboxCallMapFolder failed rc=-102
Nov 8 19:28:09 wxbuilder kernel: sf_read_super_aux err=-71
Apparently, you’ll only get this error if you use the default sharename. When you create a new shared folder, Virtualbox will ask where your shared directory is on the host. When you select the shared directory, the sharename will default to that directory. If I create a shared folder at “/home/paulsiu/vshare”, virtualbox will generate a sharename of “vshare”. Unfortunately, if you use this default sharename, you will get a protocol error, so you should rename the sharename to something other than default, such as “vboxshare” for example. I have no idea why, but that appears to be what’s happening.
With the new shared name, you can now mount the shared directory. Unfortunately, the directory is mounted as root with the group of root and read writable only by root. Since it is a bad idea to login as root, your shared directory is readonly.
The user manual suggests using the mount options and set the uid, gid, and mode. But the manual lies, you cannot set the mode. The permission on the shared directory is locked to writable by user only. This mean you cannot create a single persistent directory for all users on the system.
One way around this is to create a vshare directory in each of the user’s home directory and have the login script mount the shared directory to this home directory as the user.
mount -t vboxsf -o uid=<user> <sharename> /home/<user>/vshare
Upgrading Virtualbox
Much to my surprise, there is no easy way to upgrade to a new version of Virtualbox. The only way to upgrade Virtualbox is to uninstall the previous version and then install the new version. Apparently, not all of the settings are retained. Here’s what I did.
-
Close down all of the virtual machines.
-
Go through each of the virtual machine and make sure that you get rid of snapshots. The reason is that snapshots are not necessary compatible from version to version. If you don’t do this, you may find that you cannot start your machine any more. To recover, you will have to reinstall the old version and then get rid of the snapshots.
-
Virtualbox stores the the settings and virtual machine files in .VirtualBox in the user’s home directory on Linux. I am not sure where it is stored in windows. In any case, backup this directory in case somethings goes terribly wrong.
-
Uninstall Virtualbox. If you are using Windows Host or a Linux with package management, all you need to do is to run the uninstall. If you installed Virtualbox from source, I have no idea how you would uninstall (the manual doesn’t list a way to do it). I assume you just halt Virtualbox and then install over the previous version.
-
Install the new version of Virtualbox. With luck, all of your virtual machine should come up.
-
You may find that your guest additions no longer work and will have reinstall the guest additions.
Problems on Window Guest
Windows startup with a inaccessible boot device message
When I boot up windows 2000, I got the message “INACCESSIBLE_BOOT_DEVICE”. The problem was traced to the IDE controller type. I had set the IDE controller to PIIX4 when it was previously set to PIIX3. Setting it back to PIIX3 corrected the problem.
Entry Filed under: Virtualbox, Virtualization, linux, mandriva, suse, ubuntu. .
18 Comments Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed
1.
bneradt | December 8, 2007 at 2:03 am
Thanks for the help!
2.
VirtualBox + Fluxbuntu li&hellip | December 14, 2007 at 9:33 am
[...] for usb support: http://paulsiu.wordpress.com/2007/11/20/tips-on-running-innotek-virtualbox/ [...]
3.
Roger Gallion | December 26, 2007 at 9:32 am
Great tip on the shared folder problem. Renaming the shared folder worked for me using a WinXP host with Ubuntu 7.10 guest.
4.
Jim | December 27, 2007 at 12:40 pm
Fantastic…the share folder fix worked for me with Windows XP as my host OS and Ubuntu 7.10 as my guest. This was a life saver as I’m using both of these OSes to do things at work every day. Thanks!
5.
David | January 21, 2008 at 9:12 am
Many Thanks!!!
6.
superjamie . net » &hellip | January 22, 2008 at 7:04 pm
[...] used for finding files, as the Search function in nautilus actually looks within files. i also got usb proxy working under virtualbox, as i have a new toy to [...]
7.
Dale | February 20, 2008 at 12:25 pm
Regarding the USB proxy service entry. Did you mean to uncomment the lines in the .etc/init.d/mountdevsubfs.sh? The lines were already commented in my file. I uncommented them and USB now works on VirtualBox.
Thanks,
Dale
8.
Paolo | February 24, 2008 at 6:48 am
thanks a lot!
this page is the final solution for an every day use of vbox
thank you so much
9.
Tommy | March 1, 2008 at 5:55 pm
Thanks very much for the shared folder solution!!!
10.
Hexadecimal | April 6, 2008 at 4:36 am
Thank you for a concise explanation on how to solve the USB error!
11.
Here | April 15, 2008 at 5:29 pm
“The lines were already commented in my file. I uncommented them and USB now works on VirtualBox.” That;s the wrong thing to do.
12.
paulsiu | April 21, 2008 at 8:38 am
Yes, I should have said “Uncomment” on the USB lines. Thank you Dale and Here for the correction.
13.
PILCH Hartmut | April 30, 2008 at 2:34 pm
I am facing an even more bewildering issue. When I, as root, say
mount -t vboxsf foldi /foldi
(foldi being the name of a shared folder created from the vbox menu, /foldi that of an existing directory), I get the error message
mount: unknown file system type vboxsf
I am getting this although my guest system, suse 10.3, has the main virtualbox-related packages installed.
14.
Ken Weiner | May 5, 2008 at 11:50 pm
Thank you very much. Many other web pages mentioned that you need to uncomment the lines in /etc/init.d/mountdevsubfs.sh but this was the only web page I found that mentions that you have to edit /etc/udev/rules.d/40-permissions.rules too.
15.
Reynold | May 9, 2008 at 12:17 am
Thanks!!! I was able to mount the shared folders after reading your instructions.
16.
VirtualBox « Me and&hellip | May 11, 2008 at 12:32 pm
[...] This is a bit complicated as you have to set up some permissions and there are many slight variations all around the web telling you how to do this. One blog entry that helped me was here. [...]
17.
Anonymous | May 18, 2008 at 11:16 am
Thankx a lot!
You did a great job.
If I didn’t reach here I would not know that the SHARENAME is the name we give to the folder!
18.
dani | June 1, 2008 at 4:36 am
great! thanks a lot!