Manjaro in VirtualBox

My main system is an updated MANJARO with kernel 515 active and I would like to install in VirtualBox an additional MANJARO for testing. The actual .iso delivers kernel 6.9 and i would modify this to 6.6 (LTS) later.
Actually I ran through the virtualbox tutorial (thanks @linux-aarhus) up to section Guest monting

$ groups
sys network power vboxsf lp wheel myname
$ sys network power lp wheel $USER
bash: sys: command not found.

A shared folder is defined but not accessible, shared Clipboard does not work. Furthermore I’m not sure, if changing the guest’s kernel will need additional configuration.
I would appreciate any advice, how to finalize this.

nah - it’s just a simple copy/paste job:

sudo gpasswd -a $USER vboxsf

to add your user to that group.

You’ll also want that one:

sudo gpasswd -a $USER vboxusers

There was another user that reported problems with shared clipboard the other day with the current version of Virtualbox. He chose to downgrade and said it works.

I also noticed the shared clipboard doesn’t currently work (tried with pclinuxos & Windows 10 both in Virtualbox (7.0.18-1) . However my shared folder and drag-and-drop does work with the guest windows 10.

what ???

I read this as your host system.

Per default the guest is isolated from the host - commonly denominated as guest isolation. To be able to disable host isolation some steps are required.

I do not have any experience running a kernel in the guest later than the host and your issues may be caused by your chosen setup - host kernel being earlier than guest - of course I have no idea nor do I have any experience with this kind of setup.

The following is taken fram the above mentioned guide and is applicable no matter your use case - shared folders or shared clipboard

  • Your host user must belong to group vboxusers
  • Withing your guest system - any user must belong to group vboxsf
  • Within the guest system the service vboxservice must be enabled and active

I have tested this so may times and although I currently use vmware workstation as my hypervisor - I don’t think it has changed.

If you - for one reason or another - is not able to make this work - you may resort to using smb or nfs to share data between guest and host.

I figured out what the problem was, I didn’t have virtualbox-ext-oracle 7.0.18-1 installed, I mounted VirtualBox Guest Additions in the guest system, updated VirtualBox to 7.0.18 and everything worked.
Here are all the packages that I have installed

[vladimir@manjaro ~]$ pacman -Q | grep virtualbox
linux66-virtualbox-host-modules 7.0.18-6
virtualbox 7.0.18-1
virtualbox-ext-oracle 7.0.18-1
virtualbox-guest-iso 7.0.18-1

Thank you

I had this already from the tutorial.

This does not work here as I have no vboxusers

$ groups
sys network power vboxsf lp wheel myname

If somebody can recommend another tutorial, I’m ready to start from scratch.

As is often if not almost always the case, the Arch wiki is the place to go:

VirtualBox - ArchWiki

You need to add that group first, before you can make some user a member of it:

Users and groups - ArchWiki

This is something that the Manjaro tutorial didn’t explicitly mention or took for granted.
It is linked to and mentioned in the Arch wiki.

It is important to differentiate between the

Manjaro HOST
Manjaro GUEST

Thank you:

I checked the following:

  • HOST system
$ groups
sys network power vboxusers lp wheel myname
$ grep '^vboxusers:.*$' /etc/group | cut -d: -f4
myname
# IF NOT: sudo gpasswd -a $USER vboxusers
  • GUEST system
$ systemctl status vboxservice
Active, running!

$ groups
sys network power vboxsf lp wheel myname
$ grep '^vboxsf:.*$' /etc/group | cut -d: -f4
myname
# IF NOT: sudo gpasswd -a $USER vboxsf

So I think, all conditions should be fulfilled.
After booting the GUEST using kernel 6.9, a message shows up:
VBoxClient: the VirtualBox kernel service is not running. Exiting.
I switched the GUEST to kernel 5.15 (same as the HOST) but the same message is shown.
Running kernel 5.15 I re-installed virtualbox-guest-utils and fired:
$ sudo bash VBoxLinuxAdditions.run
Booting brings the same message.
Now what?

Maybe this helps:

VirtualBox/Install Arch Linux as a guest - ArchWiki

Proof of Concept

The plain simple way this test was conducted

On a Manjaro host using linux69 (Thinkpad X13 AMD)

sudo pacman -Syu linux69-headers dkms virtualbox-host-dkms

Used [get-iso] script to fetch a minimal xfce

get-iso xfce
  • make host user member of vboxusers group
  • log of and login to make the group stick
  • create a new virtual machine in VirtualBox GUI
  • create a folder in host user home (vbox_shared - the name is irrelevant - could be anything)
  • assign vbox_shared to be accessible by guest
    • automount
  • enable clipboard sharing both directions
  • 4G RAM, 2vcore
  • no network
  • assigned the newly fetched xfce iso to the vm
  • boot the vm
  • install - note - the mhwd makes sure the necessary components to run
  • reboot
  • ensure that vboxservice is up and running inside the guest
    • it is by default - trust is good - verification is better
  • add user to group vboxsf
  • reboot to make the group stick
  • open the filemanager in the guest
    • open folder sf_vbox_shared
    • create a new folder
    • create a text file
    • open firefox on host - copy the leading sentence from the topic
    • past into guest txt file
    • save file
  • read the file on the host

Clipboard works both ways - I never cared for drag and drop - why bother when there is shared folders and network.

Screenshot documenting PoC

2 Likes

There are several possible mistakes you’re making.

On the host, you have to install virtualbox and linux515-virtualbox-host-modules.
For your user to be able to run it, you must be part of the vboxusers group:
sudo usermod -aG vboxusers $USER.
Then do a reboot (!). This is necessary to (1) load the modules and (2) setup the group membership correctly.

Then, you should be able to start virtualbox.

In the newly installed guest system, you should install virtualbox-guest-utils and do a reboot. This should be enough to setup bi-directional clipboard access, which you must enable in the settings individually for each VM.
I don’t know about the shared folders.

Thank you @mithrial,

$ pacman -Q | grep virtualbox
linux510-virtualbox-host-modules 7.0.18-5
linux515-virtualbox-host-modules 7.0.18-5
linux54-virtualbox-host-modules 7.0.18-5
virtualbox 7.0.18-1
virtualbox-guest-iso 7.0.18-1
$

Also this is done, ref. here, incl reboot. On my host, virtualbox is running and I have several systems there, which are running without problem, incl. shared folder and bidirectional clipboard. Only the freh install Manjaro-guest has the problem.

I have:

$ pacman -Q | grep virtualbox
linux66-virtualbox-guest-modules 7.0.18-1

$ systemctl --type=service --all | sort
110 loaded units listed.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
  alsa-restore.service                                  loaded    active   exited  Save/Restore Sound Card State
...
user-runtime-dir@1000.service                           loaded    active   exited  User Runtime Directory /run/user/1000
● vboxadd.service                                       loaded    failed   failed  vboxadd.service
● vboxadd-service.service                               loaded    failed   failed  vboxadd-service.service
● vboxdrmclient.service                                 loaded    failed   failed  VirtualBox Guest VMSVGA resize client
  vboxservice.service                                   loaded    active   running VirtualBox Guest Service
● ypbind.service                                        not-found inactive dead    ypbind.service

Nevertheless, after booting the GUEST a message shows up:
VBoxClient: the VirtualBox kernel service is not running. Exiting.

Destroy the Manjaro Guest, and create a new one; this can sometimes make all the difference. Once setting up the new guest, remember to install the guest-additions within the Manjaro Guest itself.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.