VirtualBox: Difference between revisions

From NixOS Wiki
imported>Milahu
add section: VirtualBox Guest Additions
imported>Kravemir
No edit summary
Line 12: Line 12:
== VirtualBox Oracle Extensions ==
== VirtualBox Oracle Extensions ==
{{unfree}}
{{unfree}}
Oracle VirtualBox Extensions are required if you want to forward  usb2 or usb3 to your guests. The Extensions are unfree.
Oracle VirtualBox Extensions are required if you want to forward  usb2 or usb3 to your guests. The Extensions are unfree.


Line 22: Line 23:
</syntaxHighlight>
</syntaxHighlight>


Host extensions cause frequent recompilation.
{{Tip|If USB forwarding is only advanced feature used in virtualization, then consider using an open-source virtualization solution such as GNOME Boxes or Virt-Manager to avoid frequent recompilations..}}
{{Warning|Host extensions cause frequent recompilation.}}


Possible solutions:  
Possible solutions:  

Revision as of 12:05, 1 February 2023

NixOS Installation

VirtualBox can be installed on NixOS without problems, put this snippet in your configuration.nix

{
   virtualisation.virtualbox.host.enable = true;
   users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
}

Adding users to the group vboxusers allows them to use the virtualbox functionality.

VirtualBox Oracle Extensions

Note: This package is unfree and requires extra steps to install.

Oracle VirtualBox Extensions are required if you want to forward usb2 or usb3 to your guests. The Extensions are unfree.

{
   nixpkgs.config.allowUnfree = true;
   virtualisation.virtualbox.host.enable = true;
   virtualisation.virtualbox.host.enableExtensionPack = true;
}
Warning: Host extensions cause frequent recompilation.

Possible solutions:

VirtualBox Guest Additions

{
  virtualisation.virtualbox.guest.enable = true;
  virtualisation.virtualbox.guest.x11 = true;
}

See also