Install VirtualBox

From MEPIS Documentation Wiki

Jump to: navigation, search

Contents

Required knowledge

  • Opening a console and issuing simple commands
  • Copy and Paste


Introduction

VirtualBox is a software package that allows you to run another OS from within MEPIS, in a so called Virtual Machine (VM). Of course, there are other VM solutions, but VirtualBox has some outstanding characteristics:

  • Almost completely Open Source (except for some addons)
  • Easy installation
  • For Linux and Windows host systems
  • Linux, PC BSD and Windows guest systems
  • Very fast and lightweight

Preparations for installation

To prepare MEPIS for installation of VirtualBox, you need to install a couple of required packages. Act as follows:

Open a console --> type "su" and enter root password --> paste these commands into the console:

  apt-get install linux-headers-`uname -r` && ln -sf /usr/src/linux-headers-`uname -r` /usr/src/linux
  apt-get install libxalan110 libxerces27 build-essential 

Done. We can now proceed to get VirtualBox and install it.

MEPIS 7

Installation

As of mid-June, 2008, Sun Microsystems has disabled the repository supplied with M7. You now must manually download the package from this page

Important: before installation, you should install the kernel headers and the build-essential package. When they are installed, you can go ahead and install Virtualbox.

Installing in MEPIS 6.x

Go to the VirtualBox website and download from this link. Make sure you get the correct binary package. If you use MEPIS 6.x, you need to get Ubuntu 6.06 LTS ("Dapper Drake"). For MEPIS 7, you need to get Debian 4.0 ("Etch") version.

When the package is downloaded, open Konqueror and go to the folder where you saved the VirtualBox package. Press F4 to open a console in that folder. We are now going to install it via the command line.

  dpkg -i VirtualBox*.deb

Please note that your actual package name may differ. To avoid problems with the name, start typing dpkg -i Virtual and then enter a TAB. This will autocomplete the command.

The package will now be installed. At one time, it will ask you if you want to compile the kernel module. Just answer yes and the module will be created automatically.

Post installation

Once the package is installed, you need to reboot. If you don't do that, you can only run it as root. After a reboot you should be able to run VirtualBox in your regular user account. Virtual Machines will be created in ~/.VirtualBox.

You might have to add your username to the user group "vboxusers". To do this, launch KUser by clicking KMenu --> System --> More Applications --> User Manager (KUser). If you prefer the command line or you're using antiX, as root, execute


   usermod -G vboxusers -a username


insert 'username' with your name. Log out and log back in for changes to take affect.

Settings

New machine

To create a virtual machine click the new icon on the toolbar. You will be guided in creating a virtual machine. Once created and before booting a VM you can tweak the settings by clicking on the appropriate item on the right side of the Vbox screen. Settings such as System memory, video memory, Audio and others can be refined here.

For example audio should be set to what your host is using such as alsa. Slow and unresponsive VM's can be improved by increasing system memory, but do not set it too large or it will be counterproductive. A setting of 356 MEG seems to work fine for most Linux distros on a 1 MEG nachine.

Using an ISO

A nice feature and an essential one on machines without a CDROM drive is to set the CDROM to virtual and specify an iso file of the Linux distro you want to boot. It will then boot directly from the iso file into your VM and you can install permanently for those LiveCD's having an install feature. Remember to check the physical CDROM box before booting into your install. or no CDROM for machines without a physical drive.

Guest Additions

Important tip: Be sure to install VirtualBox GuestAdditions to your Guest OS, from the .iso file that is included with your VirtualBox installation. This will allow you to

  • link one or more folders on the hard disk, which are accessible from the Host OS, with the virtual network installed in the Guest OS. This enables sharing files between Guest and Host.
  • adjust your display in various ways so that it suits your environment and habits

There are other features that are enabled with VirtualBox GuestAdditions (see product documentation).

Happy VM-ing....

Documentation

Don't forget to get the excellent User Documentation. There you will find info regarding host shares, how to install the VirtualBox addons (for better screen resolution and mouse integration) and loads more.

Troubleshooting

If you get a message saying "VirtualBox kernel driver not accessible, permission problem" when starting VirtualBox right after installation, your user account is probably not listed in the vboxusers group. The installation takes care of creating that group, but you will need to manually add all users to it that should be allowed to run VirtualBox.

As root, for each such user, run

usermod -G vboxusers -a username
Personal tools
In other languages