commit
202eeb8943
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
|
@ -4,7 +4,7 @@ lastmod = "2017-07-22T15:17:22+03:00"
|
|||
+++
|
||||
# VirtualBox
|
||||
|
||||
[VirtualBox](https://virtualbox.org) is an x86 virtualization software package developed by Sun Microsystems.
|
||||
[VirtualBox](https://virtualbox.org) is an x86 virtualization software package developed by Oracle.
|
||||
|
||||
## Install kernel headers
|
||||
|
||||
|
@ -43,88 +43,54 @@ sudo eopkg upgrade
|
|||
sudo eopkg install gcc make autoconf binutils xorg-server-devel
|
||||
```
|
||||
|
||||
|
||||
Reboot your system first so that it's all up to date.
|
||||
|
||||
Now, download the [Guest Additions](http://download.virtualbox.org/virtualbox/) as an `.iso` file and mount it from VirtualBox's menu. Then in the guest machine do the following (this will also reboot your system):
|
||||
Now install the **Guest Additions** : from the VirtualBox menu `Devices` -> `Insert Guest Additions CD image...`
|
||||
|
||||
``` bash
|
||||
sudo mkdir -p /mnt/cdrom
|
||||
sudo mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
|
||||
cd /mnt/cdrom
|
||||
sudo sh VBoxLinuxAdditions.run
|
||||
sudo reboot
|
||||
```
|
||||
On the guest Machine, open `Files` and click on the optical drive icon (CD name starts with VBOXADDITIONS) then click on the `Run Software` button and follow the on screen instructions.
|
||||
|
||||
{{< altimg "autorun.png" "help-center/software/virtualbox/" >}}
|
||||
|
||||
**Note:** For each kernel update you will need to rebuild the VirtualBox Modules. So simply remount the ISO and run the instructions again.
|
||||
|
||||
### Clipboard Sharing, Copy & Paste, Drag & Drop
|
||||
### Virtual machine settings
|
||||
|
||||
By default, the VirtualBox modules for those VirtualBox features are not loaded/enabled, therefore the features simply do not work if selected in the Guest.
|
||||
If you want that these features do work properly automatically, without starting the corresponding VBoxClient yourself, you can use xdg to autostart VBoxClient thus enabling the features.
|
||||
Here is a brief overview on some options you may want to set (you can only do it when your virtual machine is not running).
|
||||
|
||||
Select your guest machine and click on the Settings icon.
|
||||
|
||||
#### Clipboard Sharing, Drag & Drop
|
||||
By default, Clipboard Sharing and Drag'n'Drop are disabled, you can change this in `General` -> `Advanced`
|
||||
|
||||
{{< altimg "vbox-clipboard.png" "help-center/software/virtualbox/" >}}
|
||||
|
||||
#### Number of CPU
|
||||
Virtual machines are created with only 1 CPU. You can change this in
|
||||
`System` -> `Processor`
|
||||
|
||||
#### 3D Acceleration
|
||||
For better performances, it is strongly recommended to enable 3D Acceleration in `Display` -> `Screen`
|
||||
|
||||
#### USB Controller
|
||||
If you have installed the [extension pack](https://www.virtualbox.org/manual/ch01.html#intro-installing) and your hardware supports it, you set the USB Controller to USB 2.0 or 3.0, in `USB`
|
||||
|
||||
Note: Access to USB is granted by the user group `vboxusers` on the **Host** operating system. You can add yourself to this group with the following command:
|
||||
|
||||
/usr/bin/VBoxClient-all:
|
||||
``` bash
|
||||
#!/bin/sh
|
||||
## @file
|
||||
# Start the Guest Additions X11 Client
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (C) 2007-2012 Oracle Corporation
|
||||
#
|
||||
# This file is part of VirtualBox Open Source Edition (OSE), as
|
||||
# available from http://www.virtualbox.org. This file is free software;
|
||||
# you can redistribute it and/or modify it under the terms of the GNU
|
||||
# General Public License (GPL) as published by the Free Software
|
||||
# Foundation, in version 2 as it comes in the "COPYING" file of the
|
||||
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
||||
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
||||
#
|
||||
|
||||
# Sanity check: if non-writeable PID-files are present in the user home
|
||||
# directory VBoxClient will fail to start.
|
||||
for i in $HOME/.vboxclient-*.pid; do
|
||||
test -w $i || rm -f $i
|
||||
done
|
||||
|
||||
if ! test -c /dev/vboxguest 2>/dev/null; then
|
||||
# Do not start if the kernel module is not present.
|
||||
notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting."
|
||||
elif test -z "${SSH_CONNECTION}"; then
|
||||
# This script can also be triggered by a connection over SSH, which is not
|
||||
# what we had in mind, so we do not start VBoxClient in that case. We do
|
||||
# not use "exit" here as this script is "source"d, not executed.
|
||||
/usr/bin/VBoxClient --clipboard
|
||||
/usr/bin/VBoxClient --checkhostversion
|
||||
/usr/bin/VBoxClient --display
|
||||
/usr/bin/VBoxClient --seamless
|
||||
/usr/bin/VBoxClient --draganddrop
|
||||
fi
|
||||
sudo usermod -aG vboxusers `whoami`
|
||||
```
|
||||
|
||||
You need to make the file executable in order for this to work:
|
||||
``` bash
|
||||
sudo chmod +x /usr/bin/VBoxClient-all
|
||||
```
|
||||
#### Shared Folders
|
||||
|
||||
/etc/xdg/autostart/vboxclient.desktop:
|
||||
``` bash
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Name=vboxclient
|
||||
Name[C]=vboxclient
|
||||
Comment[C]=VirtualBox User Session Services
|
||||
Comment=VirtualBox User Session Services
|
||||
Comment[it]=Servizi di sessione utente di VirtualBox
|
||||
Comment[pl]=Usługi sesji użytkownika VirtualBox
|
||||
Exec=/usr/bin/VBoxClient-all
|
||||
X-GNOME-Autostart-enabled=true
|
||||
X-KDE-autostart-after=panel
|
||||
```
|
||||
You can share folders from the Host to the Guest in `Shared Folders`
|
||||
|
||||
**Note:** auto-mounted shared folders are mounted into the `/media` directory, along with the prefix `sf_`. For example, the shared folder `myfiles` would be mounted to `/media/sf_myfiles`. Access to auto-mounted shared folders is only granted to the user group `vboxsf` on the Guest operating system.
|
||||
|
||||
Execute these commands to set the permissions and add yourself to the group:
|
||||
``` bash
|
||||
sudo chmod 755 /media
|
||||
sudo usermod -aG vboxsf `whoami`
|
||||
```
|
||||
## Solus as Host
|
||||
|
||||
Download the latest [VirtualBox Installer](https://www.virtualbox.org/wiki/Linux_Downloads) - [direct link](http://download.virtualbox.org/virtualbox/5.1.26/VirtualBox-5.1.26-117224-Linux_amd64.run) (5.1.26) right click link and Save As.
|
||||
|
@ -136,3 +102,5 @@ sudo sh ~/Downloads/VirtualBox-5.1.26-117224-Linux_amd64.run
|
|||
```
|
||||
|
||||
Replace the version number of the file with the one you downloaded.
|
||||
|
||||
**Note:** You will probably want to install the [Extension Pack](https://www.virtualbox.org/wiki/Downloads) to extend the functionalities of VirtualBox.
|
||||
|
|
Reference in New Issue