[HowTo] VirtualBox - Installation, USB, Shared folders

VirtualBox - Installation, USB, Shared folders

VirtualBox display issues

Topics Covered

  1. Host Packages and Installation
  2. Basic Host Configuration
  3. Basic VM Configuration
  4. Oracle VirtualBox Extensions
  5. Advanced VM Configuration
  6. Manjaro Guest Installation
  7. Other Linux Guest Installation
  8. Manjaro Guest Configuration
  9. Linux Shared Folders
  10. Troubleshooting Screen Issues
  11. Windows Guest Configuration

1. Host Packages and Installation

Packages to be installed

  • VirtualBox
  • VirtualBox Host Modules
  • VirtualBox Guest Additions ISO
  • Oracle VirtualBox Extension Pack

System Firmware

Before you install - reboot to your system and ensure you have enabled virtual extensions in your systems firmware.

systemctl reboot --firmware-setup


Your current active kernel is found using the mhwd-kernel command (@sueridgepipe note)

$ mhwd -li

Install virtualbox with the required kernel matching the output from your system.

$ pamac install virtualbox linux55-virtualbox-host-modules virtualbox-guest-iso

You need remember to install kernel modules for every kernel installed on which you intend to use VirtualBox.

Load kernel modules

Prior to using VirtualBox kernel modules must be loaded. Either restart your system or load it manually.

$ sudo vboxreload

2. Basic Host configuration

Your host user must be member of the group vboxusers. The variable $USER below translates to your current logged in username.

$ sudo gpasswd -a $USER vboxusers

Log off to register the change.

3. Basic VM configuration



  • Shared Clipboard (handy)
  • Drag'n'Drop (don't work)



  • Base Memory 2 to 4 GB
  • Untick Floppy
  • Tick Enable EFI
  • Hardware Clock UTC
    • Linux guest - ticked
    • Windows guest - unticked


  • 2 processors


The chosen default display type for any Linux is VMSVGA and this will be good for most distributions.

  • 128MB
  • 3D - may or may not work

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.

4. VirtualBox extensions

The 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-oracle

5. Advanced Guest Configuration

Advanced 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.

Attach a device

Access the DevicesUSB menu in VirtualBox Machine Window or USB menu item in the status bar. Select the USB device to mount in the virtual machine.
:warning: 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.

6. MANJARO GUEST installation

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 and the library needed to share folders, clipboard etc.

No other packages needs to be installed. Skip to the guest configuration section below. (Note: drag'n drop does not work)

If you want to verify the modules are installed
Make sure the guest modules and the guest utilities packages are installed

❯ mhwd-kernel -li
Currently running: 5.4.6-2-MANJARO (linux54)
The following kernels are installed in your system:
   * linux54
$ sudo pacman -Syu --needed virtualbox-guest-utils linux54-virtualbox-guest-modules

7. OTHER LINUX GUEST installation

For 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...

:information_source: 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.sh

8. MANJARO GUEST Configuration

In the running guest - add the user to vboxsf group. The environment variable $USER translates to the current logged in user.

$ sudo gpasswd -a $USER vboxsf

Enable the vboxservice - required for screen sizes and shared folders

$ sudo systemctl enable --now vboxservice

9. LINUX Shared folders

Shared 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.

Host Configuration

  • On the host locate the Settings section in VirtualBox GUI.
  • Make the folders Permanent and Automount.

:information_source: 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.

Guest mounting

On most Linux guests you need to create the mount folder manually

$ sudo mkdir /media

After reboot your shared folders is now available on the guest in the path


Guest mounting script

If you prefer your folders mounted in the guest user's home folder you can do so by means of this script.

[details="Linux guest script for shared folders"]

  • Create folders to mimic your shared folder names.
  • Create a file in your home folder:
$ touch ~/vboxmount.sh
$ chmod +x ~/vboxmount.sh

Edit the file and add the following content and save it.

Mounting script
# Discover VirtualBox shared folders and mount them if it makes sense
# Folders with the same name must exist in the $USER home folder

if  !  type  VBoxControl  > /dev/null;  then
  echo  "VirtualBox Guest Additions NOT found"  > /dev/stderr
  exit 1

MY_UID="$(id -u)"
MY_GID="$(id -g)"

( set -x;  sudo  VBoxControl  sharedfolder  list; )  |  \
grep      '^ *[0-9][0-9]* *- *'                      |  \
sed  -e 's/^ *[0-9][0-9]* *- *//'                    |  \
while  read  SHARED_FOLDER
  if  [ -d "$MOUNT_POINT" ];  then
    MOUNTED="$(mount  |  grep  "$MOUNT_POINT")"
    if  [ "$MOUNTED" ];  then
      echo  "Already mounted :  $MOUNTED"
        set -x
        sudo  mount  -t vboxsf  -o \
        "nosuid,uid=$MY_UID,gid=$MY_GID" \

Run the script on the guest after login.

10. Trouble shooting screen issues

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.

Opaque windows

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 - VBoxSVGA
  • Manjaro guest needs vboxservice enabled and running
    The 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.

Blurred - Distorted - Unreadable dialogs on Windows

If you use Windows and you have unreadable/blank dialogs - disable 3D/2D in the virtual machine graphics section.

If your virtual machine display does not resize correct

  1. Your guest is Manjaro
    • Ensure your graphics driver is VBoxSVGA before installing Manjaro
    • Ensure you have enabled the vboxservice
  2. Your guest is Ubuntu
    • Ensure you have the latest available drivers installed in the guest.
  3. Your guest is Windows
    • Try reinstalling the guest utils using the ISO image provided.

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.

11. WINDOWS GUEST Configuration

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.


Virtualbox shared folders bug?
[SOLVED] Virtualbox - USB <no devices available>
Manjaro as a Virtualbox Guest: additions from ISO or packages?
VirtualBox: Drag and Drop Windows 10 to Manjaro
Virtualbox with Archlinux on Manjaro
Virtualbox not automounting shared folder in guest (Manjaro KDE v18.0.2)
Help with configuring Oracle Virtualbox in Mate
[solved] Virtualbox shared folder is empty (mount failed)
Help me install Virtualbox
Cannot install VirtualBox on Manjaro 18 xfce SOLVED
Requesting proper configuration for Virtualbox (Manjaro KDE)
Virtualbox isn't showing USB devices
[solved] Virtualbox: No grub at boot in Manjaro guest vm
[solved] Virtualbox: 3D acceleration will be removed with version 6.1.0
Manjaro freezing in virtual box Windows 7 host
Persistent Storage on USB - How to Save Settings
GNOME Boxes - Accsess host filesystem via samba
VirtualBox - Kernel driver not installed (rc=-1908)
virtualbox won't start the VMs
Installed Manjaro in VirtualBox with guest additions, no fullscreen.
Error in VirtualBox
Virtualbox won't work. No /sbin/vboxconfig file
Manjaro under VirtualBox right guest addins
Manjaro on Virtualbox: screen size stuck at 800*600
Widespread VirtualBox Shared Folders breakage with [Stable Update] 2019-01-17
Widespread VirtualBox Shared Folders breakage with [Stable Update] 2019-01-17
no option for 1920x1080 in virtualbox manjaro gnome
Unable to install VirtualBox guest additions
Question about dual-booting
Failed to start kernel module
Virtulbox - Host W10 / Guest Manjaro KDE - Share Folders
Virtulbox - Host W10 / Guest Manjaro KDE - Share Folders
[SOLVED] My wlp2s0 device is missing
Virtualbox fullscreen issue and more
Oracle VM Virtual Box and USB [Solved]
Virtual Box; Host: Windows 10 Guest: Manjaro 18
How to resolve VirtualBox "Kernel Driver Not Installed" using desktop environment....
Invalid Settings- VboxSVGA on Manjaro.
virtualbox usb support
Virtualbox guest additions on Ubuntu host and Manjaro guest
Manjaro Wiki on VirtualBox Guest Additions - Resolution/Mouse Issues
How to install virtualbox?
Virtualbox - USB <no devices available>
Network fails in VirtualBox.
Unable to mount usb in guest os in Virtualbox
Virtualbox transparency
VirtualBox and full screen
Virtualbox manager window. Unable to resize.
Neue Umgebung für VirtualBox? Empfehlung? Tipps?
Virtualbox: insufficient permissions for device.
VirtualBox with Extensions doesn't see USB.
Manjaro in VirtualBox: cannot change display resolution
VBoxClient failures after updates (Oracle VirtualBox)
Clipboard sharing not working in virtualbox and other problems
VMWare resolution won't switch on KDE - will on Gnome
in VirtualBox[Win10] strange Display Error of Excel
Problem installing virtualbox
i installed openbox but screen wont open on top of majaro xfce
[Virtualbox] Display issues with VBoxSVGA Controller?
[Virtualbox] Display issues with VBoxSVGA Controller?
[HowTo] Install VirtualBox

Thank you so much. Was very useful.

Just wanted to note that I had the same issues at @Lorthirk in their thread about Guest Additions.

I don't know what the problem is but I followed the tutorial twice and still couldn't get full guest functionality on a Manjaro KDE install.

And similar to @Lorthirk I used the Guest Additions ISO successfully.

The tutorial is on using VirtualBox on Manjaro host.

Should your reply to this HowTo be understood that installing the virtualbox-guest-utils could not provide the needed funtionality but using the Guest Additions ISO did provide the functionality?

If this is the correct understanding it seems the guest utils package maybe missing something?

Since the virtualbox-guest-utils is package imported from the Arch repositories the $KERNEL-virtualbox-guest-modules maybe missing something?

1 Like

mhwd-kernel is better IMHO.

$ mhwd-kernel -li
Currently running: 5.1.0-1-MANJARO (linux51)
The following kernels are installed in your system:
   * linux419
   * linux50
   * linux51

Yes, that was my post's intention. Sorry for not being clear!

I spent some more time testing and have been unable to successfully install the guest additions through virtualbox-guest-utils and the appropriate kernel modules.

I tried two different computers (both Manjaro hosts) with both the Xfce and KDE ISOs.

Mainly, I thought it was weird that something so (seemingly) straightforward was giving users a problem. Also I often recommend people try out Manjaro in a VM and obviously want it to work well for them! :grinning:

I couldn't find any mention of the issue on the Arch forum, so maybe there is just a user error somewhere.

1 Like

Forum kindly sponsored by