How-to : Install / update Oracle VM VirtualBox

Vbox

Introduction

This post will help you installing and/or upgrading VirtualBox on a fedora 15 x86_64 host (but as I will be using the $(arch) command as a suffix you should be able to use this guide for a 32 bits host with none or very few modifications). I know this is not a very original post (a lot of good guide already exists on the web) but I prefer to have this @ home, and written in a way I can easily understand it.

I will first install VirtualBox from rpmfusion repository, then the upgrade will be done through the VirtualBox website. As for any installation you will need to follow this guide using your root user or using the sudo command.

 

1 Install VirtualBox from rpmfusion repo

Using the rpmfusion repositoy will not give you access to the very latest version of VirtualBox but it will instead give you access to a well tested version, so if you do not want to risk your installation you should prefer this repository.

1.1 Pre-requisite

In order to install VirtualBox from rpmfusion free repository you first need to setup the … rpm fusion repo! and then you only need to issue the corresponding yum command.

  1. Download rpmfusion free repository rpm
    wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
  2. Install the downloaded rpm
    rpm -Uvh rpmfusion-free-release-stable.noarch.rpm
  3. Build the yum cache
    yum makecache

 

1.2 Install VirtualBox using yum

The easy step.

  1. Run the appropriate yum  command
    yum install VirtualBox-OSE
  2. Try to launch VirtualBox (from inside a terminalwith the below command or using the software launcher)
    virtualbox

 

 

2 Install / Upgrade from VirtualBox repo

Using the VirtualBox repository will give you access to the very latest version of VirtualBox but it you may be aware that this version is not as “mature” as the rpmfusion one.

Upgrading this way allow you to get the latest version of VirtualBox as soon as it comes out, it need s a little more work than using yum but not that much. You can do this following two path, the manual one and the yum one, I explain here the manual way but you would just need to configure the virtualbox repo (see the “how-to-repositories-setup” page for that) and issue the yum update command then.

Note : this would also work for a fresh install!

2.1 Removing a rpmfusion install

IMPORTANT : Please note that if you previously installed VirtualBox from rpmfusion repo you will encounter a package conflict, to fix this you will have to uninstall the previous VirtualBox package as :

  1. List pre-existent VirtualBox package
    yum list installed virtualbox*

    – Which, in my case, shows the following

    # yum list installed virtualbox*
    Modules complémentaires chargés : langpacks, presto, refresh-packagekit
    Paquets installés
    VirtualBox-OSE.x86_64
  2. Then remove it by
    yum remove VirtualBox-OSE.x86_64

 

2.2 Setup the VirtualBox repository

  1. Configure the VirtualBox repository
    see the “how-to-repositories-setup” page

 

2.3 Install using yum

  1. Run the appropriate yum command
    yum install VirtualBox-4.1

 

 

3 Install / Upgrade from VirtualBox rpm

3.1 Manual installation

  1. Download the latest (VirtualBox-4.1-4.1.14_77440_fedora15-1.x86_64.rpm as of today) version from the Oracle VirtualBox website.
    wget http://download.virtualbox.org/virtualbox/4.1.14/VirtualBox-4.1-4.1.14_77440_fedora15-1.$(arch).rpm
  2. Once you did this you just need to run the rpm command as :
    rpm -Uvh VirtualBox-4.1-4.1.14_77440_fedora15-1.x86_64.rpm
  3. At first startup VirtualBox may ask you (or even complain) about the not loaded vboxdrvmodule, run the following
    /etc/init.d/vboxdrv setup
  4. You should not get any errors if you were upgrading (required packages should already be there)

You can now enjoy your latest version of VirtualBox!

 

 

4 Install VirtualBox guests Additions

Installing the guest additions will give you some useful bonus functionalities such as better mouse integration (automatic capture/release mouse pointer), better screen  integration (auto-resize) and so on.

4.1 Pre-requisite

This addons collection needs the kernel-devel, kernel-headers, gcc, gcc+ and dkms packages to be installed.

  1. Using yum the installation is as follows
    yum update kernel
  2. After the previous you must reboot your system, once it has rebooted continue with :
    yum install kernel-headers* kernel-devel* dkms gcc gcc-c++

 

4.2 Virtualbox Add-ons installation

  1. Mount the VBOXAdditions cd ISO
    this can be done by choosing the “install guest additions” options from the “devices” menu of your guest machine OR you can do it manually :
    Note : It is possible that you be asked to download the ISO from the web, answering yes is OK (from my point of view at least)

    mount /dev/cdrom /mnt
  2. Launch the installer from the mounted ISO (usually mounted under /media/VBOX….)
    cd <vbox addition cdrom mount point> && ./VBoxLinuxAdditions.run
  3. You may need to reboot in order to enjoy the full of the vbox additions

 

You should be done for this now.

One thought on “How-to : Install / update Oracle VM VirtualBox

  1. Pingback: Trying to install VirtualBox Guest Addition in Fedora 17

Leave a Reply

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

This site supports SyntaxHighlighter via WP SyntaxHighlighter. It can highlight your code.
How to highlight your code: Paste your code in the comment form, select it and then click the language link button below. This will wrap your code in a <pre> tag and format it when submitted.