Category:Virtualization: Difference between revisions

From NixOS Wiki
Klinger (talk | contribs)
little bit expanded to faster find the right link.
Klinger (talk | contribs)
Organized in a table. The most important configuration options added.
Line 1: Line 1:
This guide page exists to point out resources related to virtualization in the Nix ecosystem.
This guide page exists to point out resources related to virtualization in the Nix ecosystem.


== NixOS as VM guest ==
You can use
This section is for information about running NixOS as a guest virtual machine.


=== VirtualBox as host ===
* QEMU/KVM (see [[Virt-manager]])
NixOS.org hosts an [https://nixos.org/download.html#nixos-virtualbox official VirtualBox virtual appliance image] in OVA format. It is also possible to install via install image.
* [[VirtualBox]]
* [[VMware]]


=== VMware as host ===
for virtualization. You can use [[Containers]] as well.
See [[VMware]] for help using VMware to virtualize NixOS.
{| class="wikitable"
 
|+Install of host and install of guest additions
=== microvm.nix ===
!NixOS host
NixOS on NixOS with configurable virtual machine manager: https://github.com/astro/microvm.nix
!NixOS guest
 
!Code
== NixOS as a VM host ==
|-
This section covers if you want to run virtual machines from within Nix(OS).
|QEMU/KVM
 
|
=== running VMware host on NixOS ===
|
1. In your configuration.nix  add the following line
|-
<code> virtualisation.vmware.host.enable = true; </code>
|VirtualBox
 
|
2. reboot
|virtualisation.virtualbox.host.enable = true;
 
users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
=== running VirtualBox host on NixOS ===
<nowiki>#</nowiki> unfree Extension Pack
See [[VirtualBox]] for more.
nixpkgs.config.allowUnfree = true;
 
virtualisation.virtualbox.host.enableExtensionPack = true;
=== running QEMU/KVM host on NixOS ===
|-
See [[Virt-manager]]
|VMware
|
|virtualisation.vmware.host.enable = true;
|-
|
|QEMU/KVM
|services.qemuGuest.enable =true;
services.spice-vdagentd.enable = true;
|-
|
|VirtualBox
|virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.x11 = true;
|-
|
|VMware
|services.xserver.videoDrivers = [ "vmware" ];
virtualisation.vmware.guest.enable = true;
|-
|
|microvm.nix
|see  https://github.com/astro/microvm.nix
|}




[[Category:Guide]]
[[Category:Guide]]
[[Category:Virtualization]]
[[Category:Virtualization]]

Revision as of 17:02, 24 April 2024

This guide page exists to point out resources related to virtualization in the Nix ecosystem.

You can use

for virtualization. You can use Containers as well.

Install of host and install of guest additions
NixOS host NixOS guest Code
QEMU/KVM
VirtualBox virtualisation.virtualbox.host.enable = true;

users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ]; # unfree Extension Pack nixpkgs.config.allowUnfree = true; virtualisation.virtualbox.host.enableExtensionPack = true;

VMware virtualisation.vmware.host.enable = true;
QEMU/KVM services.qemuGuest.enable =true;

services.spice-vdagentd.enable = true;

VirtualBox virtualisation.virtualbox.guest.enable = true;

virtualisation.virtualbox.guest.x11 = true;

VMware services.xserver.videoDrivers = [ "vmware" ];

virtualisation.vmware.guest.enable = true;

microvm.nix see https://github.com/astro/microvm.nix