VirtualBox - Installation, USB, Shared folders
Packages to be installed
VirtualBoxVirtualBox Host ModulesVirtualBox Guest Additions ISOOracle VirtualBox Extension PackBefore you install - reboot to your system and ensure you have enabled virtual extensions in your systems firmware.
systemctl reboot --firmware-setupYour current active kernel is found using the mhwd-kernel command (@sueridgepipe note)
$ mhwd -lilinux57Install virtualbox with the required kernel matching the output from your system.
$ pamac install virtualbox linux57-virtualbox-host-modules virtualbox-guest-isoYou need remember to install kernel modules for every kernel installed on which you intend to use VirtualBox.
Prior to using VirtualBox kernel modules must be loaded. Either restart your system or load it manually.
$ sudo vboxreloadYour host user must be member of the group vboxusers. The variable $USER below translates to your current logged in username.
$ sudo gpasswd -a $USER vboxusersLog off to register the change.
The chosen default display type for any Linux is VMSVGA and this will be good for most distributions.
Use either
Or
Using VBoxSVGA or VMSVGA is a choice. VBoxSVGA will make VirtualBox complain on invalid settings but using VMSVGA your VM will not resize to adapt to changes in window size.
If you want to be sure Manjaro guest will resize correct you must choose the VBoxSVGA display type and ignore the warning.
Selecting VBoxSVGA and 3D will reset your graphics to VMSVGA and 3D.
You can cheat VBox to use VboxSVGA and 3D
Initially create the VM using VMSVGA and 3DSelect the VM in VBoxManagerIn the Display section click VMSVGA and change it to VBoxSVGAStart the VMThe extension pack is a proprietary set of extensions providing useful functionality to VirtualBox like USB2 and USB3 passthrough. The extension pack's PKGBUILD is provided from AUR so we use Pamac to build and install it.
$ pamac build virtualbox-ext-oracleAdvanced configuration requires the extension pack to be installed. You can configure USB passthrough for USB-2 and USB-3. You need to configure your guest system to use USB-3 if you have such controller. This is done in the USB Settings menu item. Do not attach any devices on this tab unless you are doing something advanced.
Access the Devices → USB menu in VirtualBox Machine Window or USB menu item in the status bar. Select the USB device to mount in the virtual machine. USB devices
To prevent data corruption on USB devices always sync and unmount USB devices safely.Do not transfer your mouse or keyboard.Do not add filters for your USB devices.Before installation ensure you are using VBoxSVGA graphics.
Graphic drivers are included are included in the kernel and Manjaro installer will use mhwd to install the kernel modules.
Install the guest utilities
$ sudo pacman -Syu virtualbox-guest-utilsFor best results, Linux as well as Windows guests needs the guest utilities installed. Prefer to use the ISO image provided as other Linux distributions might not have the most recent version of the utilities.
When you have installed the packages continue with Linux Guest Configuration or Windows Guest Configuration.
From the Devices menu of the VirtualBox Guest Window choose Insert Guest Additions CD Image...
On some Linux systems it is required to open a terminal and execute the installer from CLI. Open a file manager, browse to the mounted ISO, use the file manager to launch a terminal then start the installer.
$ ./runasroot.shIn the running guest - add the user to vboxsf group. The environment variable $USER translates to the current logged in user.
$ sudo gpasswd -a $USER vboxsfEnable the vboxservice. The service loads the required modules when run.
$ sudo systemctl enable --now vboxserviceShared folders requires extra configuration of host and guest. What needs to be done in the guest is a little different depending on the guest operation system. The following works for Manjaro.
Set the folders to Read-only if you plan to use Windows and want to browse insecure websites and other insecure activities. Doing so will prevent an eventual malware/ransomware from spreading to your host.
After reboot you will need to mount the folders
$ sudo VBoxControl sharedfolders list --automountThe folders can be accessed using /media/sf_sharename
If you get issues setting the guest screen resolution, pay attention to the graphics driver selected for the virtual machine as noted by @Teek here and @sueridgepipe here.
Open Kvantum Manager, select Configure Active Theme and navigate to Compositing & General Look.
Either activate the Disable composite effects or activate Translucent windows. Chosing the latter option please ensure VirtualBox and VirtualBoxVM is included in the list of Opaque apps.
Changing to fullscreen using the hotkeys - default Right Ctrlf depends on
graphics driver - VBoxSVGAManjaro guest needs vboxservice enabled and runningThe resize of the screen sometimes takes 5-10 seconds to adapt but if it don't adapt - use the hotkey to switch back and forth one (1) time.If you use Windows and you have unreadable/blank dialogs - disable 3D/2D in the virtual machine graphics section.
The following is not consistent but may depend on your graphics driver.
If you click on the vm window's maximize button or drag using the lower right corner, the vm may not recieve notification on the change in window size. You can expand the window by dragging a border in either direction to have the vm resize correct. Your window size will remembered so you don't have to do it every time.From the Devices menu of the VirtualBox Guest Window choose Insert Guest Additions CD Image...
Insert the guest additions and run the installer in your Windows system.
Restart the guest to make the shared folders available using the Windows Explorer.
Get PDF
PREV: What is Client-Server? Definition and FAQs | OmniSci
NEXT: What is the Client-Server Model? - Definition from WhatIs.com