Translation(s): English - 한국어 - Русский


Virtualbox logo

VirtualBox is an open source x86 emulator developed by innotek (bought by Sun, now Oracle) comparable to VMware. A proprietary extra package enhances the base experience, adding things like RDP access to the Guest. This page contains some how-to, tips and tricks when setting up and using VirtualBox.

Since version 4.0 the name suffix OSE became obsolete. All non-GPL parts are now packed in an additional extension pack available from Oracle.

Installation of non-free edition

데비안 9 "Stretch"

VirtualBox 패키지는 Debian 9에서 불가능. VirtualBox 설치하려면 stretch-backports repository 또는 upstream third-party repository 쓰세요.

stretch-backports

Oracle Virtualbox third-party repository

  1. Add virtualbox.list to /etc/apt/sources.list.d

    deb http://download.virtualbox.org/virtualbox/debian stretch contrib
  2. Add Oracle VirtualBox public key:

    curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc
    sudo apt-key add oracle_vbox_2016.asc
  3. Install virtualbox-5.1

    sudo apt-get update
    sudo apt-get install virtualbox-5.1

Complete instructions on the VirtualBox Wiki

Debian 8 "Jessie"

VirtualBox 4.3.18 is packaged for Debian 8 "Jessie".

The virtualbox-* packages were moved to contrib at VirtualBox 4.2, as a non-free compiler (Open Watcom) is required to build the BIOS.

  1. Add the "contrib" component to /etc/apt/sources.list, for example:

    # Debian 8 "Jessie"
    deb http://httpredir.debian.org/debian/ jessie main contrib
  2. Update the list of available packages:

    # sudo apt-get update
  3. Install the relevant linux-headers package and virtualbox package, for example:

    # sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox

    This will also install virtualbox-dkms and other recommended packages. DKMS will build the VirtualBox modules for your system.

VirtualBox can now be started. To not load the VirtualBox modules at system startup, edit /etc/default/virtualbox and set LOAD_VBOXDRV_MODULE to 0.

Debian 8 "Jessie" Backports

The backport allow you to install a more recent version of VirtualBox. VirtualBox 5.1.8 is packaged for Debian 8 "Jessie" via jessie-backports.

  1. Add Debian Backports sources to /etc/apt/sources.list, also including the "contrib" component. For example:

    # Backported packages for Debian 8 "Jessie"
    deb http://ftp.debian.org/debian jessie-backports main contrib
    • Important: In this source above, double check that your included "contrib" component at the end of this line. Otherwise the following steps will not install the latest version of Virtualbox and all its dependencies.
  2. Update the list of available packages:

    # apt-get update
  3. Install the relevant linux-headers package for your system, for example:

    # apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
  4. Install the jessie-backports/virtualbox package:

    # apt-get -t jessie-backports install virtualbox
  5. Optionally, you might be interested to install the jessie-backports/virtualbox-guest-additions-iso package. Which provides a number of advantages and useful additional features:

    # apt-get -t jessie-backports install virtualbox-guest-additions-iso
  6. Also optionally, you might be interested to install the jessie-backports/virtualbox-guest-x11 package. Which adds various features, such as shared clipboard, auto-resizing, seamless desktop in X11 guests such as Gnome, KDE and others, and more features:

    # apt-get -t jessie-backports install virtualbox-guest-x11

VirtualBox can now be started. To not load the VirtualBox modules at system startup, edit /etc/default/virtualbox and set LOAD_VBOXDRV_MODULE to 0.

Debian 7 "Wheezy"

VirtualBox 4.1.42 is packaged for Debian 7 "Wheezy".

  1. Install the relevant linux-headers and virtualbox packages:

    # apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox

VirtualBox can now be started. To not load the VirtualBox modules at system startup, edit /etc/default/virtualbox and set LOAD_VBOXDRV_MODULE to 0.

Debian 7 "Wheezy" Backports

The backport allow you to install a more recent version of VirtualBox. VirtualBox 4.3.36 is packaged for Debian 7 "Wheezy" via wheezy-backports.

The virtualbox-* packages were moved to contrib at VirtualBox 4.2, as a non-free compiler (Open Watcom) is required to build the BIOS.

  1. Add Debian Backports sources to /etc/apt/sources.list, also including the "contrib" component. For example:

    # Backported packages for Debian 7 "Wheezy"
    deb http://http.debian.net/debian/ wheezy-backports main contrib
  2. Update the list of available packages:

    # apt-get update
  3. Install the relevant linux-headers package for your system, for example:

    # apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
  4. Install the wheezy-backports/virtualbox package:

    # apt-get -t wheezy-backports install virtualbox

    This will also install wheezy-backports/virtualbox-dkms and other recommended packages. DKMS will build the VirtualBox modules for your system.

VirtualBox can now be started. To not load the VirtualBox modules at system startup, edit /etc/default/virtualbox and set LOAD_VBOXDRV_MODULE to 0.

시작하기

데스크탑

서버

You can start VirtualBox in Headless mode using VBoxHeadless like this:

$ VBoxHeadless -startvm "VMName"

You should run this inside a screen instance and detach the screen after starting the VM with Ctrl+a d. At least in version 4.0.x you won't need to use screen. Just start the vm with:

$ VBoxManage startvm "VMName" --type headless

and a VBoxSVC process appears in the background. You can loggoff without problems.

문제 해결

The character device /dev/vboxdrv does not exist

When starting VirtualBox, the following message is shown:

Load the VirtualBox kernel module (also load vboxnetflt in Debian Squeeze):

If the module is not found, refer to Installation to provide a virtualbox-dkms* package to your system.

You are not a member of the "vboxusers" group

As stated by VirtualBox:

Add your user account to the vboxusers group via adduser(8), as described in Installation:

Log out and log back in to your system to apply the group membership change.

Kernel driver not installed (rc=-1908)

You receive the following message

After running

VirtualBox works fine until you reboot the system. This is because "vboxdrv" is not loaded during system boot.
Solution.
Make sure that you actually have these packages in your system
1) dkms;
2) build-essential;
3) linux-headers-$(uname -r)

Then, append the following line to /etc/modules


-1909 VERR VM DRIVER NOT ACCESSIBLE

[ATTACH]

See You are not a member of the "vboxusers" group above.


RDP not working out of the box?

To get RDP working you need to install the VirtualBox Extensions Pack from the vendors website VirtualBox Downloads.

Simply download the extensions pack, click "File" => "Preferences" => "Extensions" => "Down arrow". Select the file you downloaded above. Click "OK". Restart VirtualBox.

Tips & Tricks

Switching consoles

The normal way to switch consoles in Linux is to use the ctrl-alt-Fx key combination. This does not work for a VirtualBox virtual machine (VM); it will switch consoles for the host system instead.

You should use <Host Key>-Fx instead, where <Host Key> is the key defined in File->Preferences->Input.

This also works for ctrl-alt-del and ctrl-alt-backspace

This is documented in the VirtualBox user manual in the section "Keyboard and mouse support in virtual machines", subsection "Typing special characters".

(An alternative method to switch between text consoles is to use alt-left and alt-right, but that does not work for graphical consoles like XOrg or DirectFB.)

How to remotely start virtual machines using VNC

Remote:

Local:

더 볼 것

외부 링크


ToDo:


CategoryPermalink