Skip to content

Virtualization

Virtualization using QEMU via libvirt and managed through Virt-manager.

View the nix-core NixOS module on GitHub.

Overview

  1. QEMU is the hypervisor that provides the core virtualization capabilities.
  2. libvirt is a toolkit and API that manages virtualization platforms, such as QEMU.
  3. Virt-manager is a GUI tool that interacts with libvirt to manage VMs.
  4. virsh is a CLI tool that interacts with libvirt to manage VMs.

Docs

QEMU

libvirt

If you are using the Home Manager module as well, then virsh is aliased to virsh --connect qemu:///system

Virt-manager

Setup

  1. Import this module in your NixOS config. It is recommended to use the VirtualizationHome Manager module as well.
  2. Add your user to the libvirtd group: users.users.YOU.extraGroups = [ "libvirtd" ];
  3. Rebuild and reboot: rebuild all && sudo reboot now
  4. Enable and start the default network and reboot again: virsh net-autostart default && virsh net-start default