[HowTo] VirtualBox - Installation, USB, Shared folders

VirtualBox - Installation, USB, Shared folders

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
  12. Display issues

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

Use either

    • optional select 3D
  • 128MB


  • VBoxSVGA
  • 128MB

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.

:manjaro: You can cheat VBox to use VboxSVGA and 3D

  • Initially create the VM using VMSVGA and 3D
  • Select the VM in VBoxManager
  • In the Display section click VMSVGA and change it to VBoxSVGA
  • Start the VM

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.

Install the guest utilities

$ sudo pacman -Syu virtualbox-guest-utils

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. The service loads the required modules when run.

$ 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
  • Shared Folders tab
  • Add a shared folder
  • Select the Automount option

: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

After reboot you will need to mount the folders

$ sudo VBoxControl sharedfolders list --automount

The folders can be accessed using /media/sf_sharename

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.

12. VirtualBox display issues


Virtualbox shared folders bug?
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)
virtualbox usb support
Help me install Virtualbox
Help with configuring Oracle Virtualbox in Mate
Error in VirtualBox
VBoxSVGA request
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
Virtulbox - Host W10 / Guest Manjaro KDE - Share Folders
Virtulbox - Host W10 / Guest Manjaro KDE - Share Folders
Virtualbox fullscreen issue and more
Virtual Box; Host: Windows 10 Guest: Manjaro 18
How to resolve VirtualBox "Kernel Driver Not Installed" using desktop environment....
Network fails in VirtualBox.
Virtualbox guest additions on Ubuntu host and Manjaro guest
Manjaro Wiki on VirtualBox Guest Additions - Resolution/Mouse Issues
How to install virtualbox?
[Solved] Lost internet after VirtualBox installation
Installed Manjaro in VirtualBox with guest additions, no fullscreen.
virtualbox won't start the VMs
VirtualBox - Kernel driver not installed (rc=-1908)
virtualbox guest: shared folders empty
GNOME Boxes - Accsess host filesystem via samba
Persistent Storage on USB - How to Save Settings
Manjaro freezing in virtual box Windows 7 host
Virtualbox isn't showing USB devices
Requesting proper configuration for Virtualbox (Manjaro KDE)
[HowTo] Install VirtualBox
[Virtualbox] Display issues with VBoxSVGA Controller?
i installed openbox but screen wont open on top of majaro xfce
No Authentication Window appears when it is needed to run as the super user.
How to make a simple VM for development?
Problem installing virtualbox
in VirtualBox[Win10] strange Display Error of Excel
VMWare resolution won't switch on KDE - will on Gnome
VBoxClient failures after updates (Oracle VirtualBox)
Manjaro in VirtualBox: cannot change display resolution
VirtualBox with Extensions doesn't see USB.
Virtualbox: insufficient permissions for device.
Neue Umgebung für VirtualBox? Empfehlung? Tipps?
VirtualBox VMs on a seperate NTFS partition unaffected by re-installs of host OS
Trying out other window managers without losing my plasma setup
VirtualBox Installation Error
Virtualbox manager window. Unable to resize.
Virtualbox transparency
Invalid Settings- VboxSVGA on Manjaro.
kpmcore and kpmcore3 conflict on Live USB
Shared Folder Virtual Box
Shared Folder not showing in Manjaro Gnome (virtualbox guest)
VirtualBox problem in Windows 10 installation
Virtualbox starting in very tiny: 24x80
Virtualbox and UEFI Guests - how?
Installation Problems with VirtualBox Graphic Controllers
Virtualbox - USB <no devices available>
How to configure virtualbox storage device on btrfs
VirtualBox and full screen
[Virtualbox] Display issues with VBoxSVGA Controller?
[solved] Virtualbox: No grub at boot in Manjaro guest vm
[solved] Virtualbox: 3D acceleration will be removed with version 6.1.0
Cannot install VirtualBox on Manjaro 18 xfce SOLVED
[solved] Virtualbox shared folder is empty (mount failed)
Oracle VM Virtual Box and USB [Solved]
[SOLVED] My wlp2s0 device is missing
Failed to start kernel module
[SOLVED] Virtualbox - USB <no devices available>
Clipboard sharing not working in virtualbox and other problems
I want to run a Windows program, Ham Radio Deluxe
Unable to mount usb in guest os in Virtualbox
Installation auf Virtual Box, Schwarzer Bildschirm

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