Manjaro Difference between revisions of "VirtualBox"

Difference between revisions of "VirtualBox"

From Manjaro
imported>Fhdk
(Marked this version for translation)
 
(57 intermediate revisions by 7 users not shown)
Line 1: Line 1:
= Overview =
<languages/>
__TOC__
<translate>
==Overview== <!--T:33-->


<!--T:1-->
[[file:vbox.png|left]]
[[file:vbox.png|left]]
{{tip|virtualisation is not the same as emulation. Whereas emulation makes your computer think that it is something else (such as an arcade machine or games console), virtualisation instead creates one or more virtual versions of your computer.}}
Developed by Sun Microsystems, now Oracle Corporation, '''[https://www.virtualbox.org/ VirtualBox]''' is a popular application that allows for other operating systems (known as ''Guests'') to be installed and run within an existing operating system (known as the ''Host''). This is undertaken through the process of ''virtualisation'', whereby virtual versions of your computer (also referred to as ''virtual machines'' or ''VMs'') are created within and draw resources directly from the host system. As such, how fast or powerful a virtual machine may be will depend entirely on the resources available - and allocated - for it to use. The benefits of virtualisation include:
Developed by Sun Microsystems, now Oracle Corporation, '''[https://www.virtualbox.org/ VirtualBox]''' is a popular application that allows for other operating systems (known as ''Guests'') to be installed and run within an existing operating system (known as the ''Host''). This is undertaken through the process of ''virtualisation'', whereby virtual versions of your computer (also referred to as ''virtual machines'' or ''VMs'') are created within and draw resources directly from the host system. As such, how fast or powerful a virtual machine may be will depend entirely on the resources available - and allocated - for it to use. The benefits of virtualisation include:
<br clear="all" />
<br clear="all" />
* The fast and easy installation of other operating systems without affecting your existing system (e.g. no need for dual booting and/or preparation in the form of hard disk partitioning or re-sizing)
* The fast and easy installation of other operating systems without affecting your existing system (e.g. no need for dual booting and/or preparation in the form of hard disk partitioning or re-sizing)
* Completely safe learning and experimentation with operating systems, as nothing that occurs within a Guest will affect the Host (e.g. the Host operating system can also be installed as a Guest in a virtual machine as a risk-free means of trying out new things), and
* Completely safe learning and experimentation with operating systems, as nothing that occurs within a Guest will affect the Host (e.g. the Host operating system can also be installed as a Guest in a virtual machine as a risk-free means of trying out new things), and
* An almost unlimited capacity to install as many additional operating systems as desired...provided space is available on your hard drive to store them!
* An almost unlimited capacity to install as many additional operating systems as desired...provided space is available on your hard drive to store them!


= Enabling Virtualisation =
==Installing Virtualbox on Manjaro== <!--T:2-->
 
===Enabling Virtualisation===
[[file:vt.png|thumb|left|375px]]
Before installing VirtualBox, it is important to first ensure that '''virtualization''' has been enabled in your BIOS. The exact instructions for doing this vary based on your hardware. Please review the manual provided by your computer or motherboard manufacturer for specific instructions.
 
 
{{warning|Unless you know exactly what you are doing, please DO NOT alter or amend any other BIOS settings!}}
 
 
Before even ''thinking'' about installing VirtualBox, it is <u>'''absolutely essential'''</U> to first ensure that '''virtualisation''' has been enabled on your computer. Otherwise - if virtualisation has not been enabled - then assuming VirtualBox can even be run at all, its features and capabilities will be severely limited. For example, where VirtualBox has been installed on a 64-bit system, it will only be able to run 32-bit operating systems as Guests. As virtualisation is usually disabled by default, it will therefore be necessary to go into your computer's BIOS settings in order to activate it.  
 
Below is an example of enabling virtualisation for a HP G62 Laptop using an Intel chip-set (it may be a slightly different process for your own computer):
<br clear="all" />
 
1. Reboot the computer
 
2. As it restarts, press the F10 key to enter into the BIOS Menu
 
3. Use the arrow keys to scroll across to the '''System Configuration''' tab
 
4. Use the arrow keys to highlight the '''Virtualisation Technology''' option, and press <enter>
 
5. Select the '''Enabled''' option, and press <enter>
 
6. Use the arrow keys to scroll across to the '''Exit''' tab
 
7. Ensure that the '''Exit Saving Changes''' option is highlighted and press <enter>
 
 
= Installing VirtualBox and its Extension Pack=
 
 
Although a basic VirtualBox Installation may suffice for some users, it is also recommended to download and install the optional '''Extension Pack''' for it. This provides several new features, including the ability to use USB devices such as data sticks and printers in virtual machine environments.
 
 
==Install VirtualBox==
 
 
{{tip|You will need to know what kernel version is being run when installing VirtualBox. To acquire this information, enter the command '''uname -r''' into the terminal.}}
 
 
To install VirtualBox, enter the following command in the terminal:
 
sudo pacman -S virtualbox


===Install VirtualBox=== <!--T:3-->
'''Make sure your system is using a supported kernel'''
{{UserCmd|command=mhwd-kernel -l}}


It will then be necessary to select the appropriate '''VirtualBox Host Module''' to install, depending on the kernel version currently being run. Rather like installing a driver, doing so will ensure that VirtualBox is able to run properly. For example, where running kernel 3.7, the appropriate number would be entered to install the following module:
<!--T:34-->
 
To install VirtualBox, you need to install the packages {{ic|virtualbox}} and {{ic|linux*-virtualbox-host-modules}}.  The latter must match the version of the kernel you are running. To list what kernels is installed use mhwd (example)
uname -r
{{UserCmdOutput|command=mhwd-kernel -li|result=
 
<pre>
You will have something like : ''3.7.4-1-MANJARO''. It means that the kernel is ''linux37''. Then install it with
Currently running: 6.6.17-1-MANJARO (linux66)
 
The following kernels are installed in your system:
sudo pacman -S linux''37''-virtualbox-host-modules
  * linux66
</pre>}}


<!--T:4-->
To install VirtualBox and the kernel modules for your installed kernel enter the following command in the terminal - continuing the above example:
{{UserCmd|command=sudo pacman -Syu virtualbox linux66-virtualbox-host-modules}}


<!--T:5-->
Once the installation has completed, it will then be necessary to add the ''VirtualBox Module'' to your kernel. '''The easy way is to simply reboot your system'''. Otherwise, to start using VirtualBox immediately, enter the following command:
Once the installation has completed, it will then be necessary to add the ''VirtualBox Module'' to your kernel. '''The easy way is to simply reboot your system'''. Otherwise, to start using VirtualBox immediately, enter the following command:
{{UserCmd|command=sudo vboxreload}}


sudo vboxreload
===Install the Extension Pack(Optional)=== <!--T:6-->
 
{{tip|VirtualBox messages<br/><code>/sbin/vboxconfig</code> &rarr; <code>sudo vboxreload</code><br/><code>/sbin/rcvbox</code> &rarr; <code>sudo vboxreload</code> }}
 
== Where Using Multiple Kernels ==


'''Should a new kernel be installed at a later time''', there will be no need to add the VirtualBox module again to it. This is because the '''[[Manjaro_Kernels|Manjaro Hardware Detection tool for Kernels]]''' (mwhd-kernel) will automatically update new kernels with all existing modules being used during the installation process.
<!--T:35-->
The extension pack is a proprietary set of extensions providing extra functionality to VirtualBox like USB2 and USB3 passthrough. You only need this if you are going to use the functionality provided and it is '''not required''' for VirtualBox to function.
* Oracle Cloud Infrastructure integration
* USB 2.0 and USB 3.0 Host Controller
* Host Webcam
* VirtualBox RDP
* PXE ROM
* Disk Encryption
* NVMe


<!--T:7-->
{{Important|As noted by VirtualBox - it is important you are using the extension pack matching your installed version of VirtualBox.<br/>
'''Please install the same version extension pack as your installed version of VirtualBox.''' – [https://www.virtualbox.org/wiki/Downloads VirtualBox Download page]}}
Check your VirtualBox version (example)
{{UserCmdOutput|command=vboxmanage --version|result=<pre>7.0.14r161095</pre>}}


'''However, should multiple kernels already be installed''' - and the intention is to use VirtualBox with them as well - then it will be necessary to add the VirtualBox module to them in addition. In order to add the VirtualBox module to another existing kernel:
====Install extensionpack using AUR==== <!--T:8-->


1. Select the appropriate kernel at the bootup screen
<!--T:36-->
Locate the correct AUR PKGBUILD using pamac (or the AUR helper of choice) - example is using '''pamac'''
{{Important|AUR PKGBUILDs labelled manjaro is '''not''' maintained by Manjaro!}}
{{UserCmdOutput|command=pamac search --aur virtualbox-ext-oracle|result=
<pre>
virtualbox6-ext-oracle  6.1.x-5                              AUR
    Oracle VM VirtualBox Extension Pack 6.1.48 (stable)
virtualbox6.1-ext-oracle  6.1.50-1                            AUR
    Oracle VM VirtualBox Extension Pack (version 6.1)
virtualbox-ext-oracle-dev  7.0.97.161344-1                    AUR
    Oracle VM VirtualBox Extension Pack for virtualbox dev
    version
virtualbox-ext-oracle  7.0.14-1                              AUR
    Oracle VM VirtualBox Extension Pack
</pre>}}


2. Download the '''VirtualBox Host Utilities''' for that particular kernel, as this provides the necessary ''vboxdrv'' VirtualBox module to add. The syntax of the command to do so is:
<!--T:9-->
When you have found the match you can install using the helper - example is using pamac
{{UserCmd|command=pamac build virtualbox-ext-<nowiki><your-decision></nowiki>}}


sudo pacman -S [kernel version]-virtualbox-host-modules
====Get extensionpack from VirtualBox==== <!--T:10-->
Same rule apply - match your VirtualBox version - usually the latest version applies.
<blockquote>
[https://www.virtualbox.org/wiki/Downloads  Downloads – Oracle VM VirtualBox]
</blockquote>
If the latest version do not match yours - you can find earlier versions using this page
<blockquote>
[https://www.virtualbox.org/wiki/Download_Old_Builds Download Old Builds - Oracle VM Virtualbox]
</blockquote>
The extension '''.vbox-extpack''' is a registered mime extension so just open the file and VirtualBox will install the extension pack. Provide your password when asked.


== Configuring the host == <!--T:11-->
=== Adding Your Account to the '''vboxusers''' User Group ===
The final step is to now add your personal user account to the {{ic|vboxusers}} group. This is necessary in order to fully access the features provided by VirtualBox. The '''$USER''' variable translates to the currently logged in user and you must logout or restart for the change to take effect.
{{UserCmd|command=sudo gpasswd -a $USER vboxusers}}


When listing the kernel version currently being used in the command, it is not necessary to write the entire version number. Any version of Kernel 3.5 can be listed simply as 'linux35', and any version of Kernel 3.6 can be listed as 'linux36', and so on. As an example, the following command will install  the ''VirtualBox Host Utilities'' specifically for kernel version 3.5:
==Manjaro VBox guest== <!--T:12-->
For those intending to use Manjaro under VirtualBox, you can install Manjaro as usual. Please observe below point of setting the correct display type.  


sudo pacman -S linux35-virtualbox-host-modules
===Selecting a Display Controller=== <!--T:13-->
Before installation of Manjaro Guest set display controller to VMSVGA


<!--T:37-->
The VirtualBox guideline is


3. Once the ''VirtualBox Host Utilities'' have been downloaded, enter the following command to add the VirtualBox module to the kernel:
<!--T:38-->
* select VMSVGA for a Linux guest
* select VBoxSVGA for a Windows guest


sudo modprobe vboxdrv
<!--T:39-->
If you are using a Desktop utilizing wayland, enable 3D for best experience.


===Troubleshooting Manjaro guest=== <!--T:14-->
If you deem it necessary to ensure the packages are installed please follow this recipe
{{UserCmdOutput|command=mhwd-kernel -li|result=
<pre>
Currently running: 6.6.17-1-MANJARO (linux66)
The following kernels are installed in your system:
    * linux66
</pre>}}
{{UserCmd|command=sudo pacman -Syu virtualbox-guest-utils}}


==Install the Extension Pack==
===Guest Configuration=== <!--T:15-->
You will need to load the modules if you don't want to reboot:
{{UserCmd|command=sudo modprobe vboxguest vboxvideo vboxsf}}


It is not available from the Manjaro repositories.
<!--T:16-->
The guest utils than need to be started and enabled:
{{UserCmd|command=sudo systemctl enable --now vboxservice.service}}


'''It is available in the Arch User Repositories - AUR.'''[https://aur.archlinux.org/packages/virtualbox-ext-oracle/]
<!--T:17-->
Add you VM user to the vboxsf group (this requires you to logout to apply the new group)
{{UserCmd|command=sudo usermod -aG vboxsf <nowiki>${USER}</nowiki>}}


[[file:vxextpackb.png|thumb|left|375px]]
<!--T:18-->
Create media folder in root directory if it does not already exist
{{UserCmd|command=sudo mkdir /media}}


If it is obtained directly from Oracle, '''[http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html Virtualbox Downloads Section of Oracle's website]''', be aware that you will have to give personal details to Oracle. Again, the Extension pack provides a number of additional and advanced features not otherwise available. Even if there is no immediate intention to use the features provided, it is still worthwhile installing in order to have a complete installation. Once at the downloads section of Oracle's website, to obtain the VirtualBox Extension Pack:
<!--T:19-->
<br clear="all" />
Assign the correct permissions to the media folder to be able to access shared folders
 
{{UserCmd|command=sudo chmod 755 /media}}
1. Scroll down towards the bottom of the page to find the '''Oracle VM VirtualBox Extension Pack''' section
 
2. Click on the appropriate link for the VirtualBox version installed to download the Extension Pack
 
3. After the Extension Pack has downloaded, start the VirtualBox application
 
4. Once VirtualBox has started, select '''File''' from the top menu, and then '''Preferences'''
 
5. Select the '''Extensions''' tab to view that section, and then click a icon called '''Add Package''' located on the far right
 
7. Locate the downloaded Extension Pack, ensure it is highlighted, and then click the '''Open''' button to begin the installation process
 
8. Confirm that you wish to install the Extension Pack, and then confirm that you agree to the license terms (it will at least be necessary to scroll down to the bottom of the terms to activate the '''I Agree''' button)
 
9. The Extension Pack should install within a few seconds, and a confirmation message will appear.
 
 
The final step is to now add your personal user account to the '''vbox User Group'''. This is necessary in order to fully access the features provided by VirtualBox, including the ability to use USB devices in a Guest operating system.
 
= Adding Your Account to the vbox User Group =
 
The syntax of the command to add your user-name to the vbox user group is:
 
sudo gpasswd -a [username] vboxusers
 
 
As an example, the command listed below will add the personal user account named 'carl' to the vbox user group:
 
sudo gpasswd -a <font color="green">'''carl'''</font color> vboxusers
 
 
Now reboot your system for the change to take effect.
 
 
= Advice, Tips, and Tricks =
 
{{tip|The '''[http://www.virtualbox.org/manual/ VirtualBox Manual]''' will be of immense use to new users.}}


==Advise, Tips, and Tricks== <!--T:20-->


<!--T:21-->
Advice on using Virtualbox effectively, as well as some tips and tricks learned along the way, have been provided for the benefit of new users.
Advice on using Virtualbox effectively, as well as some tips and tricks learned along the way, have been provided for the benefit of new users.


===Guest Installation=== <!--T:22-->
* Virtualbox can run installation files (ISOs) directly as virtual discs, so there is no need to burn them to an installation medium such as a disc or USB data stick.
* The process to install any Guest operating system, [[Installation_Guides|including Manjaro]], is exactly the same as if actually installing for real on your computer.


==Running Manjaro in VirtualBox==
===Guest Additions=== <!--T:23-->
Guest Additions are special software packages designed to improve the performance and usability of guest operating systems.


For those intending to use VirtualBox in Ubuntu or an Ubuntu-based distribution (e.g. Mint, Zorin, Kubuntu, etc) - in order to run Manjaro in it, of course! - the author has provided a comprehensive YouTube VirtualBox video guide:
<!--T:24-->
They are installed within the Guest operating system itself, and most notably result in enhancing the display resolution, as well as enabling much better control over the mouse. As such, two tell-tale signs that Guest Additions have not been installed in a Guest are that the display will not scale to the size of the display window (i.e. it will be necessary to scroll around to see the whole screen), and the mouse may be quite hard to control.


* Part 1: '''[http://www.youtube.com/watch?v=a9PusQjgzPU VirtualBox Introduction]'''
<!--T:25-->
* Part 2: '''[http://www.youtube.com/watch?v=Wh9-WtRb6LQV BIOS Settings and Installation]'''
Instructions for installing the guest additions in Manjaro are provided above. For other operating systems please review the VirtualBox instructions [[#See Also|linked below]]
* Part 3: '''[http://www.youtube.com/watch?v=3TGNfmhoSts Virtual Machine Setup and vbox User Group]'''
* Part 4: '''[http://www.youtube.com/watch?v=syWEboy5KoM ISO installation, Internet Connection, and Guest Additions]'''


===Guest Display=== <!--T:26-->
If you are using other guests e.g. Ubuntu, Linux Mint and others be sure to use the default VMSVGA display driver.


Existing Manjaro users may still find Part 3 of particular interest if they are unfamiliar with using VirtualBox. '''However, please note that the Guest Additions section in the fourth video does not apply to Manjaro or <u>any</u> Arch-based distribution'''.  
<!--T:27-->
It will be necessary to activate the '''Enable 3D acceleration''' box in order to allow for some desktop effects (such as transparency) to be shown. This can be undertaken by going into the settings menu, and then selecting the '''Display''' section.


For Manjaro the Guest Additions is installed using the command
<!--T:28-->
If you are getting screen distortion or transparent dialogs using Windows guest - shutdown the VM and change the graphics settings of the VM. Remove the checkbox for '''Enable 3D acceleration'''.


sudo pacman -Syu virtualbox-guest-utils
===Guest Internet Connection=== <!--T:29-->
Some users have encountered problems when attempting to connect their virtual machine to the internet using the default VirtualBox settings. Where this is the case, try the following solution


More importantly, using the method shown to install Guest Additions in Manjaro (or any Arch-based distribution) will break the system permanently, rendering it unusable.
<!--T:30-->
 
* Click the '''Settings Button''' and then select the '''Network''' tab
==Guest Installation==
* Next to the '''Attached to''' heading is a button that states '''NAT'''. Click it to reveal a drop down menu and select '''Bridged Adapter''' instead.
 
* Next to the '''Name''' heading is a button whereby you may select how you are currently connected to the internet (e.g. ''Wlan'' means Wireless, and ''Eth0'' means Ethernet). Select the appropriate connection type you are currently using.
* Virtualbox can run installation files (ISOs) directly as ''virtual discs'', so there is no need to burn them to an installation medium such as a disc or USB data stick.
* Click the '''OK''' button to confirm.
 
* The process to install any Guest operating system - '''[[Installation_Guides|including Manjaro]]''' - is exactly the same as if actually installing for real on your computer.
 
==Guest Additions==
 
{{note|'''Manjaro will already have Guest Additions pre-installed, so there is no need to add it yourself'''.}}
 
Guest Additions are special software packages designed to improve the performance and usability of guest operating systems. They are installed '''within''' the Guest operating system itself, and most notably result in enhancing the display resolution, as well as enabling much better control over the mouse. As such, two tell-tale signs that Guest Additions have not been installed in a Guest are that the display will not scale to the size of the display window (i.e. it will be necessary to scroll around to see the whole screen), and the mouse may be quite hard to control.
 
 
==Guest Display==
 
* It will be necessary to activate the '''Enable 3D acceleration''' box in order to allow for some desktop effects (such as transparency) to be shown. This can be undertaken by going into the settings menu, and then selecting the '''Display''' section.
 
 
==Guest Internet Connection==
 
Some users have encountered problems when attempting to connect their virtual machine to the internet using the default VirtualBox settings. Where this is the case, try the following solution (covered in the fourth VirtualBox YouTube Tutorial from the 4:28 mark):
 
1. Click the '''Settings Button''' and then select the '''Network''' tab
 
2. Next to the '''Attached to''' heading is a button that states '''NAT'''. Click it to reveal a drop down menu and select '''Bridged Adaptor''' instead.
 
3. Next to the '''Name''' heading is a button whereby you may select how you are currently connected to the internet (e.g. ''Wlan'' means Wireless, and ''Eth0'' means Ethernet). Select the appropriate connection type you are currently using.
 
4. Click the '''OK''' button to confirm.
 
 
==General==
 
* A VirtualBox installation may not automatically detect when USB device has been connected. As such, it may therefore be necessary to click the USB icon located at the bottom of the VirtualBox window in order to select and activate it.


==General Troubleshooting== <!--T:31-->
* A VirtualBox installation will not automatically detect when USB device has been connected. As such, it is therefore necessary to click the USB icon located at the bottom of the VirtualBox window in order to select and activate it.
* It is possible to enable the (very useful) ability to copy and paste text between the Guest and Host systems. This is undertaken by clicking '''Settings''' button and then going to the '''General''' Section.
* It is possible to enable the (very useful) ability to copy and paste text between the Guest and Host systems. This is undertaken by clicking '''Settings''' button and then going to the '''General''' Section.
* Don't be afraid to take risks, to experiment, and to have fun with Guest operating systems. The worst that can happen is that they will have to be re-installed!
* Don't be afraid to take risks, to experiment, and to have fun with Guest operating systems. The worst that can happen is that they will have to be re-installed!


==VirtualBox in the Forum==
==See Also== <!--T:32-->
If you have problems installing ask here [https://forum.manjaro.org/t/how-to-install-virtualbox/22183 How to install VirtualBox]
* [https://https://forum.manjaro.org/t/howto-virtualbox-installation-usb-shared-folder/1178 VirtualBox Installation, USB and Shared Folders Forum Wiki HowTo]
 
* The official [http://www.virtualbox.org/manual/ VirtualBox Manual]
</translate>


[[Category:Contents Page]]
[[Category:Contents Page{{#translation:}}]]
[[Category:Virtualisation]]
[[Category:Virtualisation{{#translation:}}]]

Latest revision as of 05:15, 1 August 2024

Other languages:
English • ‎Türkçe • ‎português do Brasil • ‎русский

Overview

Vbox.png

Developed by Sun Microsystems, now Oracle Corporation, VirtualBox is a popular application that allows for other operating systems (known as Guests) to be installed and run within an existing operating system (known as the Host). This is undertaken through the process of virtualisation, whereby virtual versions of your computer (also referred to as virtual machines or VMs) are created within and draw resources directly from the host system. As such, how fast or powerful a virtual machine may be will depend entirely on the resources available - and allocated - for it to use. The benefits of virtualisation include:

  • The fast and easy installation of other operating systems without affecting your existing system (e.g. no need for dual booting and/or preparation in the form of hard disk partitioning or re-sizing)
  • Completely safe learning and experimentation with operating systems, as nothing that occurs within a Guest will affect the Host (e.g. the Host operating system can also be installed as a Guest in a virtual machine as a risk-free means of trying out new things), and
  • An almost unlimited capacity to install as many additional operating systems as desired...provided space is available on your hard drive to store them!

Installing Virtualbox on Manjaro

Enabling Virtualisation

Before installing VirtualBox, it is important to first ensure that virtualization has been enabled in your BIOS. The exact instructions for doing this vary based on your hardware. Please review the manual provided by your computer or motherboard manufacturer for specific instructions.

Install VirtualBox

Make sure your system is using a supported kernel

user $ mhwd-kernel -l COPY TO CLIPBOARD


To install VirtualBox, you need to install the packages virtualbox and linux*-virtualbox-host-modules. The latter must match the version of the kernel you are running. To list what kernels is installed use mhwd (example)


$ mhwd-kernel -li

Currently running: 6.6.17-1-MANJARO (linux66)
The following kernels are installed in your system:
   * linux66


To install VirtualBox and the kernel modules for your installed kernel enter the following command in the terminal - continuing the above example:

user $ sudo pacman -Syu virtualbox linux66-virtualbox-host-modules COPY TO CLIPBOARD


Once the installation has completed, it will then be necessary to add the VirtualBox Module to your kernel. The easy way is to simply reboot your system. Otherwise, to start using VirtualBox immediately, enter the following command:

user $ sudo vboxreload COPY TO CLIPBOARD


Install the Extension Pack(Optional)

The extension pack is a proprietary set of extensions providing extra functionality to VirtualBox like USB2 and USB3 passthrough. You only need this if you are going to use the functionality provided and it is not required for VirtualBox to function.

  • Oracle Cloud Infrastructure integration
  • USB 2.0 and USB 3.0 Host Controller
  • Host Webcam
  • VirtualBox RDP
  • PXE ROM
  • Disk Encryption
  • NVMe


Info
As noted by VirtualBox - it is important you are using the extension pack matching your installed version of VirtualBox.
Please install the same version extension pack as your installed version of VirtualBox.VirtualBox Download page


Check your VirtualBox version (example)


$ vboxmanage --version

7.0.14r161095


Install extensionpack using AUR

Locate the correct AUR PKGBUILD using pamac (or the AUR helper of choice) - example is using pamac

Info
AUR PKGBUILDs labelled manjaro is not maintained by Manjaro!



$ pamac search --aur virtualbox-ext-oracle

virtualbox6-ext-oracle  6.1.x-5                               AUR
    Oracle VM VirtualBox Extension Pack 6.1.48 (stable)
virtualbox6.1-ext-oracle  6.1.50-1                            AUR
    Oracle VM VirtualBox Extension Pack (version 6.1)
virtualbox-ext-oracle-dev  7.0.97.161344-1                    AUR
    Oracle VM VirtualBox Extension Pack for virtualbox dev
    version
virtualbox-ext-oracle  7.0.14-1                               AUR
    Oracle VM VirtualBox Extension Pack


When you have found the match you can install using the helper - example is using pamac

user $ pamac build virtualbox-ext-<your-decision> COPY TO CLIPBOARD


Get extensionpack from VirtualBox

Same rule apply - match your VirtualBox version - usually the latest version applies.

Downloads – Oracle VM VirtualBox

If the latest version do not match yours - you can find earlier versions using this page

Download Old Builds - Oracle VM Virtualbox

The extension .vbox-extpack is a registered mime extension so just open the file and VirtualBox will install the extension pack. Provide your password when asked.

Configuring the host

Adding Your Account to the vboxusers User Group

The final step is to now add your personal user account to the vboxusers group. This is necessary in order to fully access the features provided by VirtualBox. The $USER variable translates to the currently logged in user and you must logout or restart for the change to take effect.

user $ sudo gpasswd -a $USER vboxusers COPY TO CLIPBOARD


Manjaro VBox guest

For those intending to use Manjaro under VirtualBox, you can install Manjaro as usual. Please observe below point of setting the correct display type.

Selecting a Display Controller

Before installation of Manjaro Guest set display controller to VMSVGA

The VirtualBox guideline is

  • select VMSVGA for a Linux guest
  • select VBoxSVGA for a Windows guest

If you are using a Desktop utilizing wayland, enable 3D for best experience.

Troubleshooting Manjaro guest

If you deem it necessary to ensure the packages are installed please follow this recipe


$ mhwd-kernel -li

 Currently running: 6.6.17-1-MANJARO (linux66)
 The following kernels are installed in your system:
    * linux66
 
user $ sudo pacman -Syu virtualbox-guest-utils COPY TO CLIPBOARD


Guest Configuration

You will need to load the modules if you don't want to reboot:

user $ sudo modprobe vboxguest vboxvideo vboxsf COPY TO CLIPBOARD


The guest utils than need to be started and enabled:

user $ sudo systemctl enable --now vboxservice.service COPY TO CLIPBOARD


Add you VM user to the vboxsf group (this requires you to logout to apply the new group)

user $ sudo usermod -aG vboxsf ${USER} COPY TO CLIPBOARD


Create media folder in root directory if it does not already exist

user $ sudo mkdir /media COPY TO CLIPBOARD


Assign the correct permissions to the media folder to be able to access shared folders

user $ sudo chmod 755 /media COPY TO CLIPBOARD


Advise, Tips, and Tricks

Advice on using Virtualbox effectively, as well as some tips and tricks learned along the way, have been provided for the benefit of new users.

Guest Installation

  • Virtualbox can run installation files (ISOs) directly as virtual discs, so there is no need to burn them to an installation medium such as a disc or USB data stick.
  • The process to install any Guest operating system, including Manjaro, is exactly the same as if actually installing for real on your computer.

Guest Additions

Guest Additions are special software packages designed to improve the performance and usability of guest operating systems.

They are installed within the Guest operating system itself, and most notably result in enhancing the display resolution, as well as enabling much better control over the mouse. As such, two tell-tale signs that Guest Additions have not been installed in a Guest are that the display will not scale to the size of the display window (i.e. it will be necessary to scroll around to see the whole screen), and the mouse may be quite hard to control.

Instructions for installing the guest additions in Manjaro are provided above. For other operating systems please review the VirtualBox instructions linked below

Guest Display

If you are using other guests e.g. Ubuntu, Linux Mint and others be sure to use the default VMSVGA display driver.

It will be necessary to activate the Enable 3D acceleration box in order to allow for some desktop effects (such as transparency) to be shown. This can be undertaken by going into the settings menu, and then selecting the Display section.

If you are getting screen distortion or transparent dialogs using Windows guest - shutdown the VM and change the graphics settings of the VM. Remove the checkbox for Enable 3D acceleration.

Guest Internet Connection

Some users have encountered problems when attempting to connect their virtual machine to the internet using the default VirtualBox settings. Where this is the case, try the following solution

  • Click the Settings Button and then select the Network tab
  • Next to the Attached to heading is a button that states NAT. Click it to reveal a drop down menu and select Bridged Adapter instead.
  • Next to the Name heading is a button whereby you may select how you are currently connected to the internet (e.g. Wlan means Wireless, and Eth0 means Ethernet). Select the appropriate connection type you are currently using.
  • Click the OK button to confirm.

General Troubleshooting

  • A VirtualBox installation will not automatically detect when USB device has been connected. As such, it is therefore necessary to click the USB icon located at the bottom of the VirtualBox window in order to select and activate it.
  • It is possible to enable the (very useful) ability to copy and paste text between the Guest and Host systems. This is undertaken by clicking Settings button and then going to the General Section.
  • Don't be afraid to take risks, to experiment, and to have fun with Guest operating systems. The worst that can happen is that they will have to be re-installed!

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.