Difference between revisions of "VirtualBox"
Views
Actions
Namespaces
Variants
Tools
m
minor formatting - doubled empty lines fixed headlines using correct layers h1 h2 h3 h4
imported>Fhdk |
imported>Fhdk m (minor formatting - doubled empty lines fixed headlines using correct layers h1 h2 h3 h4) |
||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
==Overview== | |||
= Overview = | |||
[[file:vbox.png|left]] | [[file:vbox.png|left]] | ||
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! | ||
==Installing Virtualbox on Manjaro== | |||
=Installing Virtualbox on Manjaro= | ===Enabling Virtualisation=== | ||
==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. | 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=== | |||
==Install VirtualBox== | 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) | ||
$ mhwd-kernel -li | |||
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 | |||
Currently running: 5.4.0-1-MANJARO (linux54) | Currently running: 5.4.0-1-MANJARO (linux54) | ||
The following kernels are installed in your system: | The following kernels are installed in your system: | ||
* linux54 | * linux54 | ||
To install VirtualBox and automatically install the kernel modules for your installed kernels enter the following command in the terminal: | To install VirtualBox and automatically install the kernel modules for your installed kernels enter the following command in the terminal: | ||
$ sudo pacman -Syu virtualbox linux54-virtualbox-host-modules | |||
sudo pacman -Syu virtualbox linux54-virtualbox-host-modules | |||
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: | ||
$ sudo vboxreload | |||
===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. | |||
==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 | * Oracle Cloud Infrastructure integration | ||
* USB 2.0 and USB 3.0 Host Controller | * USB 2.0 and USB 3.0 Host Controller | ||
Line 59: | Line 37: | ||
As noted by VirtualBox - it is important you are using the extension pack matching your installed version of VirtualBox. | As noted by VirtualBox - it is important you are using the extension pack matching your installed version of VirtualBox. | ||
{{warning|The extension pack '''must''' match the version of VirtualBox installed on your system | |||
{{ | |||
<blockquote>'''Please install the same version extension pack as your installed version of VirtualBox.''' – [https://www.virtualbox.org/wiki/Downloads VirtualBox Download page]</blockquote> | <blockquote>'''Please install the same version extension pack as your installed version of VirtualBox.''' – [https://www.virtualbox.org/wiki/Downloads VirtualBox Download page]</blockquote> | ||
}} | }} | ||
Check your VirtualBox version (example) | Check your VirtualBox version (example) | ||
$ vboxmanage --version | $ vboxmanage --version | ||
6.1.14r140239 | 6.1.14r140239 | ||
===Install using | ====Install extensionpack using AUR==== | ||
Locate the correct AUR PKGBUILD using pamac (or the AUR helper of choice) - example is using '''pamac''' | Locate the correct AUR PKGBUILD using pamac (or the AUR helper of choice) - example is using '''pamac''' | ||
Line 94: | Line 69: | ||
Pack | Pack | ||
</pre> | </pre> | ||
When you have found the match you can install using the helper - example is using pamac | When you have found the match you can install using the helper - example is using pamac | ||
$ pamac build virtualbox-ext-<your-decision> | |||
====Get extensionpack from VirtualBox==== | |||
Same rule apply - match your VirtualBox version - usually the latest version applies. | Same rule apply - match your VirtualBox version - usually the latest version applies. | ||
<blockquote> | |||
[https://www.virtualbox.org/wiki/Downloads Downloads – Oracle VM VirtualBox] | [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 | 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] | [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. | 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. | ||
== Adding Your Account to the '''vboxusers''' User Group == | ==Configuring the host== | ||
=== 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 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. | ||
$ sudo gpasswd -a $USER vboxusers | |||
The | |||
==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. | 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== | ===Selecting a Display Controller=== | ||
Before installation of Manjaro ensure the correct display settings for VM. The Manjaro recommendation - to ensure the best experience - is contradicting the recommendations from VirtualBox developers. To have the VM screensize adapting to the window size - you need enable VBoxSVGA but doing so you cannot enable 3D. To use 3D you need to use VMSVGA which will force you to set the VM screen size inside the VM. If you use the VMSVGA adapter - mhwd will keep telling you to switch - you can do it but you will not be able to utilize 3D graphics. | |||
Before installation of Manjaro ensure the correct display settings for VM. | |||
===Troubleshooting guest=== | |||
=== | |||
If you deem it necessary to ensure the packages are installed please follow this recipe | If you deem it necessary to ensure the packages are installed please follow this recipe | ||
$ mhwd-kernel -li | |||
Currently running: 5.4.0-1-MANJARO (linux54) | Currently running: 5.4.0-1-MANJARO (linux54) | ||
The following kernels are installed in your system: | The following kernels are installed in your system: | ||
* linux54 | * linux54 | ||
$ sudo pacman -Syu virtualbox-guest-utils linux54-virtualbox-guest-modules | |||
=== Guest Configuration === | ===Guest Configuration=== | ||
You will need to load the modules if you don't want to reboot: | You will need to load the modules if you don't want to reboot: | ||
sudo modprobe vboxguest vboxvideo vboxsf | $ sudo modprobe vboxguest vboxvideo vboxsf | ||
The guest utils than need to be started and enabled: | The guest utils than need to be started and enabled: | ||
sudo systemctl enable --now vboxservice.service | $ sudo systemctl enable --now vboxservice.service | ||
Add you VM user to the vboxsf group (this requires you to logout to apply the new group) | Add you VM user to the vboxsf group (this requires you to logout to apply the new group) | ||
sudo gpasswd -a $USER vboxsf | $ sudo gpasswd -a $USER vboxsf | ||
==Advice, 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. | 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=== | |||
==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. | * 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. | * 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=== | |||
==Guest Additions== | |||
Guest Additions are special software packages designed to improve the performance and usability of guest operating systems. | 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. | 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 [[#See Also|linked below]] | Instructions for installing the guest additions in Manjaro are provided above. For other operating systems please review the VirtualBox instructions [[#See Also|linked below]] | ||
===Guest Display=== | |||
==Guest Display== | |||
If you are using other guests e.g. Ubuntu, Linux Mint and others be sure to use the default VMSVGA display driver. | If you are using other guests e.g. Ubuntu, Linux Mint and others be sure to use the default VMSVGA display driver. | ||
Line 190: | Line 135: | ||
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'''. | 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== | ===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 | 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 | ||
1. Click the '''Settings Button''' and then select the '''Network''' tab | 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 Adapter''' instead. | 2. 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. | ||
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. | 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. | 4. Click the '''OK''' button to confirm. | ||
==General Troubleshooting== | ==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. | * 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! | ||
=See Also= | ==See Also== | ||
* [https://archived.forum.manjaro.org/t/how-to-install-virtualbox/22183 How to install VirtualBox Forum Topic] | * [https://archived.forum.manjaro.org/t/how-to-install-virtualbox/22183 How to install VirtualBox Forum Topic] | ||
* [https://https://forum.manjaro.org/t/howto-virtualbox-installation-usb-shared-folder/1178 VirtualBox Installation, USB and Shared Folders Forum Wiki HowTo] | * [https://https://forum.manjaro.org/t/howto-virtualbox-installation-usb-shared-folder/1178 VirtualBox Installation, USB and Shared Folders Forum Wiki HowTo] |