Manjaro VirtualBox

VirtualBox

From Manjaro
Revision as of 23:04, 14 December 2012 by imported>Verityproductions

Overview

Vbox.png



Tip
virtualisation is not the same as emulation. Whereas emulation makes your computer think that it is something else (such as an arcade machine or games console), virtualisation instead creates one or more virtual versions of your computer.


Developed by the Oracle Corporation, VirtualBox is a popular application that allows for other operating systems (known as Guests) to be installed and run within an existing operating system (known as the Host). This is undertaken through the process of virtualisation, whereby virtual versions of your computer (also referred to as virtual machines or VMs) are created within and draw resources directly from the host system. As such, how fast or powerful a virtual machine may be will depend entirely on the resources available - and allocated - for it to use. The benefits of virtualisation include:

  • The fast and easy installation of other operating systems without affecting your existing system (e.g. no need for dual booting and/or preparation in the form of hard disk partitioning or re-sizing)
  • Completely safe learning and experimentation with operating systems, as nothing that occurs within a Guest will affect the Host (e.g. the Host operating system can also be installed as a Guest in a virtual machine as a risk-free means of trying out new things), and
  • An almost unlimited capacity to install as many additional operating systems as desired...provided space is available on your hard drive to store them!


Enabling Virtualisation

Warning
Unless you know exactly what you are doing, please DO NOT alter or amend any other BIOS settings!


Before even thinking about installing Virtualbox, it is absolutely essential to first ensure that virtualisation has been enabled on your computer. Otherwise - if virtualisation has not been enabled - then assuming Virtualbox can even be run at all, its features and capabilities will be severely limited. For example, where Virtualbox has been installed on a 64-bit system, it will only be able to run 32-bit operating systems. As virtualisation is usually disabled by default, it will therefore be necessary to go into your computer's BIOS settings in order to activate it. Below is an example of enabling virtualisation for a HP G62 Laptop using an Intel chip-set (it may be a slightly different process for your own computer):


1. Reboot the computer

2. As it restarts, press the F10 key to enter into the BIOS Menu

3. Use the arrow keys to scroll across to the System Configuration tab

4. Use the arrow keys to highlight the Virtualisation Technology option

5. Press <enter>, select the Enabled option, and press <enter> again

6. Use the arrow keys to scroll across to the Exit tab

7. Ensure that the Exit Saving Changes option is highlighted and press <enter>


Installing Virtualbox and its Extension Pack

Although a basic Virtualbox Installation may suffice for some users, it recommended to also download and install the optional Extension Pack for it. This provides several new features, including the ability to use USB devices such as data sticks and printers in virtual machine environments.


Install Virtualbox

To install Virtualbox, enter the following command in the terminal:

sudo pacman -S virtualbox


Once complete, it will then be necessary to add the Virtualbox Module to your kernel. Rather like installing a driver, doing so will ensure that Virtualbox is able to run properly. To add the Virtualbox kernel module, enter the following command:

sudo modprobe vboxdrv


  • Should a new kernel be installed at a later time, there will be no need to add the Virtualbox module again to it. This is because the Manjaro Hardware Detection tool for Kernels (mwhd-kernel) will automatically update new kernels with all existing modules being used during the installation process.


  • However, should multiple kernels already be installed - and the intention is to use Virtualbox with them as well - then it will be necessary to add the Virtualbox module to them as well. To do so, simply select the desired kernel version at the boot screen and re-enter the modprobe command provided in the terminal.


Install the Extension Pack

This must be obtained directly from the Virtualbox Downloads Section of Oracle's website, as it is not available from the Manjaro repositories. Again, the Extension pack provides a number of additional and advanced features not otherwise available. Even if there is no immediate intention to use the features provided, it is still worthwhile installing in order to have a complete installation. Once at the downloads section of Oracle's website, to obtain the Virtualbox Extension Pack:


1. Scroll down towards the bottom of the page to find the Oracle VM Virtualbox Extension Pack section

2. Click on the appropriate link for the Virtualbox version installed to download the Extension Pack

3. After the Extension Pack has downloaded, start the Virtualbox application

4. Once Virtualbox has started, select File from the top menu, and then Preferences

5. Select the Extensions tab to view that section, and then click a icon called Add Package located on the far right

7. Locate the downloaded Extension Pack, ensure it is highlighted, and then click the Open button to begin the installation process

8. Confirm that you wish to install the Extension Pack, and then confirm that you agree to the license terms (it will at least be necessary to scroll down to the bottom of the terms to activate the I Agree button)

9. The Extension Pack should install within a few seconds, and a confirmation message appears.


The final step is to now add your personal user account to the vbox User Group. This is necessary in order to fully access the features provided by Virtualbox, including the ability to use USB devices in a Guest operating system.


Adding Your Account to the vbox User Group

The syntax of the command to add your user-name to the vbox user group is:

sudo gpasswd -a [username] vboxusers


As an example, the command listed below will add the personal user account named 'carl' to the vbox user group:

sudo gpasswd -a carl vboxusers


Now reboot your system for the change to take effect.


Advice, Tips, and Tricks

Tip
The Virtualbox Manual will be of immense use to new users.


For those intending to use Virtualbox in Ubuntu or an Ubuntu-based distribution (e.g. Mint, Zorin, Kubuntu, etc) - in order to run Manjaro in it, of course! - the author has provided a comprehensive YouTube Virtualbox video guide:


Existing Manjaro users may still find Part 3 of particular interest if they are unfamiliar with using virtualbox. However, please note that the Guest Additions section in the fourth video does not apply to Manjaro or any Arch-based distribution. In respect to Manjaro, this is because Guest Additions - special software designed to enhance and improve Virtualbox installations - will already have been pre-installed for you. More importantly, using the method shown to install Guest Additions in Manjaro (or any Arch-based distribution) will break the system permanently, rendering it unusable. Where necessary, the appropriate method to install Guest Additions has been provided below.


Installation

  • Virtualbox can run installation files (ISOs) directly as virtual discs, so there is no need to burn them to an installation medium such as a disc or USB data stick.
  • The process to install any Guest operating system - including Manjaro - is exactly the same as if actually installing for real on your compuer.


Guest Additions

Note
Manjaro will already have Guest Additions pre-installed, so there is no need to add it yourself.

Guest Additions are special software packages designed to improve the performance and usability of guest operating systems. They are installed within the Guest operating system itself, and most notably result in enhancing the display resolution, as well as enabling much better control over the mouse. As such, two tell-tale signs that Guest Additions have not been installed in a Guest are that the display will not scale to the size of the display window (i.e. it will be necessary to scroll around to see the whole screen), and the mouse may be quite hard to control.


Internet Connection

Some users have encountered problems when attempting to connect their virtual machine to the internet using the default Virtualbox settings. Where this is the case, try the following solution (covered in the fourth Virtualbox YouTube Tutorial from the 4:28 mark):

1. Click the Settings Button and then select the Network tab

2. Next to the Attached to heading is a button that states NAT. Click it to reveal a drop down menu and select Bridged Adaptor instead.

3. Next to the Name heading is a button whereby you may select how you are currently connected to the internet (e.g. Wlan means Wireless, and Eth0 means Ethernet). Select the appropriate connection type you are currently using.

4. Click the OK button to confirm.


General

  • A virtualbox installation may not automatically detect when USB device has been connected. As such, it may therefore be necessary to click the USB icon located at the bottom of the Virtualbox window in order to select and activate it.
  • It is possible to enable the (very useful) ability to copy and paste text between the Guest and Host systems. This is undertaken by clicking Settings button and then going to the General Section.
  • Don't be afraid to take risks, to experiment, and to have fun with Guest operating systems. The worst that can happen is that they will have to be re-installed!
Cookies help us deliver our services. By using our services, you agree to our use of cookies.