Virtual Box Short Guide

Short guide for installation of Oracle’s VirtualBox on a Ubuntu host system, with USB devices passed through and host system file systems mapped the guest VM (Windows XP in this case).

  1. Installation
    Download the .deb binary as well as the extension pack fromĀ VirtualBox.org.
    Install the binary (double click).
    The VirtualBox appears under Applications / System Tools. (The OSE version, part of many Linux repositories appears under Accessories)
    Open the VirtualBox Manager and select File – Preferences – Extensions.
    Click on the upper icon near the empty extension package list and select the previously downloaded extension pack.
    Close the dialogue and the VirtualBox Manager.
    Go to System – Administration – Users and Groups.
    Select Manage Groups and scroll down to the new vboxusers group. Double click the group and add yourself or the account under which VirtualBox should run to the group.
    Logout of Linux and login again to make the new group membership valid.
  2. Create a new VM and install the guest OS or load a pre-configured image.
    This part is quite straight forward, therefore no details here.
  3. USB configuration
    The VM must be off.
    Select the VM to be configured and click on Settings.
    Go to USB and enable the USB Controller and USB 2.0.
    Click the second icon right of the empty USB Device Filters list with the green plus.
    A list with currently detected USB devices on the host system appears. Select the desired device.
    Start the VM.
    Under Devices – USB Devices select the USB device to be mounted.
    In my case I had to unplug and plug again the scanner before it was recognized by the Windows XP VM.
  4. Drive mapping
    On the running VM window select Devices – Shared Folders…
    Click on the top most icon right of the folders list.
    Click Folder Path – Others and select your host system folder to appear in VM.
    In the guest OS, map a drive to the selected folder.
    WinXP:
    My Computer – Tools – Map Network Drive… Browse – Entire Network – VirtualBox Shared Folders – Vboxsvr – your folder
  5. Guest Add-ons
    The guest OS can run unmodified on the host. Nevertheless, some improvements can be achieved by installing supporting add-ons to the guest OS, the so called “Guest Additions”. The most visible improvement is the automatic resizing of the guest OS’s screen size to the window available on the host.
    The add-ons can be installed over the “Devices – Install Guest Additions…” menu on the VM window. The additions are normally part of the Virtualbox distribution and will be mounted automatically. It’s also possible to install the add-ons by opening the mounted ISO icon on desktop.
  6. Others
    In my current setup: Ubuntu 11.04 as host and Ubuntu 11.04 and 10.04 as guests, enabling “3D acceleration” makes the resizing of the VM window extremely slow and erroneous. I recommend to leave this unchecked.
    By default the host acts as NAT device towards the guest. As the host is very often behind a NAT router anyway, this means double NAT. I recommend to change the setting to “Bridged Adapter” in the VB manager, network setiings for the respective guest. In this mode the guest is exposed to the LAN the same way as the guest and retrieved the IP from the LAN’s main router, or can get it’s own fixed IP. E.g. the host acts like an Ethernet switch.
    Virtual boxes might be used only temporarily or for special purposes. Still, the used and produced data should often be kept permanently. Therefore it makes sense to mount NAS storage to the VMs and keep all data separately, permanent and secure. To enable SMB or CIFS mounts, the package smbfs must be installed on Ubuntu. A simple automatic mount mount can be achieved by adding the line:
    //192.168.0.14/sw /home/stefan/sw-320 cifs iocharset=utf8,dir_mode=0777 0 0
    to /etc/fstab.
    Many more options, especially for the secure authentication, can be added. Please google.

Loading

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *