Category:Virtualization: Difference between revisions
mNo edit summary |
Refactor page: split tables, improve introduction |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This | This category page exists to list resources related to <strong>virtualisation</strong> in the Nix ecosystem. | ||
You can use | == Overview == | ||
You can use the following technologies for classic virtualisation on NixOS. You can also use [[:Category:Container|containers]], though they come with their own advantages and drawbacks. | |||
* QEMU/KVM (see [[Virt-manager]]) | * QEMU/KVM (see [[Virt-manager]]) | ||
* [[VirtualBox]] | * [[VirtualBox]] | ||
* [[VMware]] | * [[VMware]] | ||
* The [[Xen Project Hypervisor]] | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+Installing a hypervisor on the host system. | ||
! | !Hypervisor | ||
!Code snippet to be added to <code>configuration.nix</code> | |||
!Code | |||
|- | |- | ||
|QEMU/KVM | |QEMU/KVM | ||
| | |{{file|configuration.nix|nix| | ||
<nowiki> | |||
{ | |||
virtualisation.libvirtd.enable = true; | |||
programs.virt-manager.enable = true; # can be used to manage non-local hosts as well | # if you use libvirtd on a desktop environment | ||
programs.virt-manager.enable = true; # can be used to manage non-local hosts as well | |||
} | |||
</nowiki> | |||
}} | |||
|- | |||
|Xen Project Hypervisor | |||
|{{file|configuration.nix|nix| | |||
<nowiki> | |||
{ | |||
virtualisation.xen.enable = true; | |||
} | |||
</nowiki> | |||
}} | |||
|- | |- | ||
|VirtualBox | |VirtualBox | ||
| | |{{file|configuration.nix|nix| | ||
<nowiki> | |||
users.extraGroups.vboxusers.members = [ " | { | ||
virtualisation.virtualbox.host.enable = true; | |||
users.extraGroups.vboxusers.members = [ "username" ]; | |||
# Non-free Extension Pack | |||
nixpkgs.config.allowUnfree = true; | |||
virtualisation.virtualbox.host.enableExtensionPack = true; | |||
} | |||
</nowiki> | |||
}} | |||
|- | |- | ||
|VMware | |VMware | ||
| | |{{file|configuration.nix|nix| | ||
<nowiki> | |||
{ | |||
virtualisation.vmware.host.enable = true; | |||
} | |||
</nowiki> | |||
}} | |||
|} | |||
{| class="wikitable" | |||
|+Installing the appropriate guest utilities on a virtualised system. | |||
!Hypervisor the guest is running on | |||
!Code snippet to be added to the guest's <code>configuration.nix</code> | |||
|- | |- | ||
|QEMU/KVM | |QEMU/KVM | ||
|services.qemuGuest.enable =true; | |{{file|configuration.nix|nix| | ||
services.spice-vdagentd.enable = true; | <nowiki> | ||
{ | |||
services.qemuGuest.enable =true; | |||
services.spice-vdagentd.enable = true; | |||
} | |||
</nowiki> | |||
}} | |||
|- | |- | ||
|VirtualBox | |VirtualBox | ||
|virtualisation.virtualbox.guest.enable = true; | |{{file|configuration.nix|nix| | ||
virtualisation.virtualbox.guest.x11 = true; | <nowiki> | ||
{ | |||
virtualisation.virtualbox.guest.enable = true; | |||
virtualisation.virtualbox.guest.x11 = true; | |||
} | |||
</nowiki> | |||
}} | |||
|- | |- | ||
|VMware | |VMware | ||
|services.xserver.videoDrivers = [ "vmware" ]; | |{{file|configuration.nix|nix| | ||
virtualisation.vmware.guest.enable = true; | <nowiki> | ||
{ | |||
services.xserver.videoDrivers = [ "vmware" ]; | |||
virtualisation.vmware.guest.enable = true; | |||
} | |||
</nowiki> | |||
}} | |||
|- | |- | ||
|microvm.nix | |microvm.nix | ||
| | |Consult the [https://astro.github.io/microvm.nix/ MicroVM.nix documentation] | ||
[[Category:Software]] | [[Category:Software]] | ||
[[Category:Desktop]] | [[Category:Desktop]] | ||
[[Category:Server]] | [[Category:Server]] |