Difference between revisions of "Configure VirtualBox"

From gr0x0rd
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
to your ''/etc/portage/package.license'' in order to emerge the software. Once you are ready,  
 
to your ''/etc/portage/package.license'' in order to emerge the software. Once you are ready,  
 
  '''$''' sudo emerge -av virtualbox-bin virtualbox-modules
 
  '''$''' sudo emerge -av virtualbox-bin virtualbox-modules
Once the emerge has completed, you'll need to add yourself or any other users wanting to run VirtualBox to the vboxusers group. Substitute your username in the place of ''username'' below.
+
Once the emerge has completed, you'll need to add yourself or any other users wanting to run VirtualBox to the vboxusers group. Substitute your username in the place of ''username'' below. You'll need to log in an log out for this to take effect if you aren't familiar with the ''newgrp'' command.
 
  '''$''' sudo usermod -a -G vboxusers ''username''
 
  '''$''' sudo usermod -a -G vboxusers ''username''
 
Before starting VirtualBox, you'll need to initialize the VirtualBox modules.
 
Before starting VirtualBox, you'll need to initialize the VirtualBox modules.
Line 13: Line 13:
 
  '''$''' sudo modprobe vboxnetflt
 
  '''$''' sudo modprobe vboxnetflt
 
  '''$''' sudo modprobe vboxnetadp
 
  '''$''' sudo modprobe vboxnetadp
To set these modules to automatically load when your system starts you'll need to add them to ''/etc/modules.autoload.d/kernel-2.6''.
+
To set these modules to automatically load when your system starts you'll need to add them to ''/etc/conf.d/modules''.
  '''$''' sudo nano -w /etc/modules.autoload.d/kernel-2.6
+
  '''$''' sudo nano -w /etc/conf.d/modules
 
Make sure the file contains the following directives:
 
Make sure the file contains the following directives:
 +
modules="
 +
...
 
  vboxdrv
 
  vboxdrv
 
  vboxnetflt
 
  vboxnetflt
 
  vboxnetadp
 
  vboxnetadp
 +
"
 
Also remember, whenever you update your kernel, you will also need to reinstall the ''app-emulation/virtualbox-modules'' package.
 
Also remember, whenever you update your kernel, you will also need to reinstall the ''app-emulation/virtualbox-modules'' package.
  
Line 24: Line 27:
 
  VBoxManage startvm ''VirtualMachine''
 
  VBoxManage startvm ''VirtualMachine''
 
You may want to dress up your launcher with a sexy icon. Here are a few sexy png images stolen from various locations throughout the web.
 
You may want to dress up your launcher with a sexy icon. Here are a few sexy png images stolen from various locations throughout the web.
[[File:Xp_logo.png‎]] [[File:Vista_logo.png‎]] [[File:Windows7_logo.png]] [[File:Apple_logo.png‎]]
+
[[File:Xp_logo.png‎]] [[File:Vista_logo.png‎]] [[File:Windows7_logo.png]] [[File:Apple-Logo-icon.png‎]]

Latest revision as of 11:08, 16 June 2011

Virtualization - Configure VirtualBox

Virtualization is one of the most powerful tools of modern computing. It allows you to emulate just about any other computing environment on your own hardware, among other things. In a nutshell, it allows you to run Windows where it belongs- in a Window. There are many virtualization tools out there. This guide focuses on one that is user-friendly and easy to set up, VirtualBox. VirtualBox was started by a German company that was purchased by Sun Microsystems, which has recently been purchased by Oracle. Let's hope using VirtualBox remains free. VirtualBox has both a source and binary distribution. The advantage of the binary distribution is USB support, so that is what this guide focuses on.

Before you begin, you'll need to add the directive

app-emulation/virtualbox-bin PUEL

to your /etc/portage/package.license in order to emerge the software. Once you are ready,

$ sudo emerge -av virtualbox-bin virtualbox-modules

Once the emerge has completed, you'll need to add yourself or any other users wanting to run VirtualBox to the vboxusers group. Substitute your username in the place of username below. You'll need to log in an log out for this to take effect if you aren't familiar with the newgrp command.

$ sudo usermod -a -G vboxusers username

Before starting VirtualBox, you'll need to initialize the VirtualBox modules.

$ sudo modprobe vboxdrv
$ sudo modprobe vboxnetflt
$ sudo modprobe vboxnetadp

To set these modules to automatically load when your system starts you'll need to add them to /etc/conf.d/modules.

$ sudo nano -w /etc/conf.d/modules

Make sure the file contains the following directives:

modules="
...
vboxdrv
vboxnetflt
vboxnetadp
"

Also remember, whenever you update your kernel, you will also need to reinstall the app-emulation/virtualbox-modules package.

There are probably many guides out there explaining how to use VirtualBox and install a guest operating system such as WindowsXP or Windows7. However, once you have installed a guest O/S, it's not easily explained how to create a shortcut to it. To do so, simply right-click anywhere on your Desktop or Panel and choose "Create Launcher". Enter whatever you'd like for the name and comment, and use the directive below to command VirtualBox to start the VM. Simply substitute VirtualMachine with the name of your VM.

VBoxManage startvm VirtualMachine

You may want to dress up your launcher with a sexy icon. Here are a few sexy png images stolen from various locations throughout the web. Xp logo.png Vista logo.png Windows7 logo.png Apple-Logo-icon.png