8

VirtualBox on Artix (Arch-based Linux): Install

 2 years ago
source link: https://dev.to/nabbisen/virtualbox-on-artix-arch-based-linux-install-ghn
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Summary

Artix is Arch-based Linux. What they declare is "Simple. Fast. Systemd-free."

I installed Oracle VM VirtualBox on it.
This post shows how I did it.
It includes a troubleshooting about vm failure at boot.

Pacman, a package manager for Arch Linux, is available in Artix as well. Therefore, I used it.
Well, on this point, there was a bit difference from my past installation with Manjaro, another Arch-based Linux.

Steps

Below, You can also use sudo instead of doas

Installation

Could we get it via Pacman? Let's search:

$ pacman -Ss virtualbox

Enter fullscreen mode

Exit fullscreen mode

The output was:

(...)
galaxy/virtualbox 6.1.32-2
    Powerful x86 virtualization for enterprise as well as home use
(...)
galaxy/virtualbox-host-dkms 6.1.32-2
    VirtualBox Host kernel modules sources
(...)

Enter fullscreen mode

Exit fullscreen mode

The installation is simple! Just run:

$ doas pacman -Sy virtualbox

Enter fullscreen mode

Exit fullscreen mode

Then, you'll get:

:: Synchronizing package databases...
 system is up to date
 world is up to date
 galaxy is up to date
 extra is up to date
 community is up to date
resolving dependencies...
:: There are 4 providers available for VIRTUALBOX-HOST-MODULES:
:: Repository galaxy
   1) virtualbox-host-dkms  2) virtualbox-host-modules-artix
:: Repository community
   3) virtualbox-host-dkms  4) virtualbox-host-modules-arch

Enter a number (default=1): 

Enter fullscreen mode

Exit fullscreen mode

Here, press Enter key once. The process goes on:

looking for conflicting packages...

Packages (4) dkms-3.0.3-1  sdl-1:1.2.15+r406+gf1caf909-1  virtualbox-host-dkms-6.1.32-2
             virtualbox-6.1.32-2

Total Download Size:    36.46 MiB
Total Installed Size:  173.79 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 virtualbox-6.1.32-2-x...    35.4 MiB   666 KiB/s 00:54 [##############################] 100%
 virtualbox-host-dkms-...   709.5 KiB   601 KiB/s 00:01 [##############################] 100%
 sdl-1:1.2.15+r406+gf1...   369.2 KiB   515 KiB/s 00:01 [##############################] 100%
 dkms-3.0.3-1-any            36.2 KiB  87.8 KiB/s 00:00 [##############################] 100%
 Total (4/4)                 36.5 MiB   642 KiB/s 00:58 [##############################] 100%
(4/4) checking keys in keyring                          [##############################] 100%
(4/4) checking package integrity                        [##############################] 100%
(4/4) loading package files                             [##############################] 100%
(4/4) checking for file conflicts                       [##############################] 100%
(4/4) checking available disk space                     [##############################] 100%
:: Processing package changes...
(1/4) installing sdl                                    [##############################] 100%
Optional dependencies for sdl
    alsa-lib: ALSA audio driver [installed]
    libpulse: PulseAudio audio driver [installed]
(2/4) installing dkms                                   [##############################] 100%
Optional dependencies for dkms
    linux-headers: build modules against the Arch kernel [installed]
    linux-lts-headers: build modules against the LTS kernel
    linux-zen-headers: build modules against the ZEN kernel
    linux-hardened-headers: build modules against the HARDENED kernel
(3/4) installing virtualbox-host-dkms                   [##############################] 100%
(4/4) installing virtualbox                             [##############################] 100%
Optional dependencies for virtualbox
    vde2: Virtual Distributed Ethernet support
    virtualbox-guest-iso: Guest Additions CD image
    virtualbox-ext-vnc: VNC server support
    virtualbox-sdk: Developer kit
:: Running post-transaction hooks...
(1/6) Creating system user accounts...
Creating group 'vboxusers' with GID 108.
(2/6) Reloading device manager configuration...
(3/6) Updating the MIME type database...
(4/6) Install DKMS modules
==> dkms install --no-depmod vboxhost/6.1.32_OSE -k 5.16.7-artix1-1
==> depmod 5.16.7-artix1-1
(5/6) Updating icon theme caches...
(6/6) Updating the desktop file MIME type cache...

Enter fullscreen mode

Exit fullscreen mode

Done!

Initial configuration (= Troubleshooting)

Are we ready? No, not yes, in face. But you don't have to worry.
All what to do in addition is run this before start VirtualBox:

$ doas /sbin/vboxreload

Enter fullscreen mode

Exit fullscreen mode

If you behave not as superuser here, you will see the error "You must be root". When you meet some error here, logging off or rebooting the host machine may fix it.

Well, the output was:

Unloading modules:
Loading modules: vboxnetadp vboxnetflt vboxdrv

Enter fullscreen mode

Exit fullscreen mode

Prepared completely.

(Besides) What kind of failure is mitigated here?

If you didn't run vboxreload, it would fail to start vm (virtual machine) and you would see the errors.

Result Code: NS_ERROR_FAILURE
Failed to open a session for the virtual machine {vm name}.

The virtual machine '{vm name}' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

Enter fullscreen mode

Exit fullscreen mode

Kernel driver not installed (rc=-1908)
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

Enter fullscreen mode

Exit fullscreen mode

Start VirtualBox

Well, let's start the application.
In my desktop environment, Xfce4, the menu is in [System] - [Oracle VM VirtualBox]:

The main window will appear.

Conclusion

Thus, we can install VirtualBox on Artix Linux as well as Arch Linux and other distros.

Of course, it's able to use it as usual after installation.

Practice to create OpenBSD vm

The rest is how to create a OpenBSD vm with VirtualBox briefly with some screenshots.

Create a new machine

Attach installer media in settings

(Optional) Configure others such as network if necessary

For example, Port forwarding in Advanced enables SSH with NAT network easily.

Start vm to install

Detach media when installation completed

Enjoy your vm

Happy computing 😊


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK