All Projects → nix-community → nixops-libvirtd

nix-community / nixops-libvirtd

Licence: LGPL-3.0 license
NixOps libvirtd backend plugin [maintainer=@AmineChikhaoui]

Programming Languages

python
139335 projects - #7 most used programming language
Nix
1067 projects
shell
77523 projects

NixOps backend for libvirtd

NixOps (formerly known as Charon) is a tool for deploying NixOS machines in a network or cloud.

Quick Start

Prepare libvirtd

In order to use the libvirtd backend, a couple of manual steps need to be taken.

Note: The libvirtd backend is currently supported only on NixOS.

Configure your host NixOS machine to enable libvirtd daemon, add your user to libvirtd group and change firewall not to filter DHCP packets.

virtualisation.libvirtd.enable = true;
users.extraUsers.myuser.extraGroups = [ "libvirtd" ];
networking.firewall.checkReversePath = false;

Next we have to make sure our user has access to create images by executing:

images=/var/lib/libvirt/images
sudo mkdir $images
sudo chgrp libvirtd $images
sudo chmod g+w $images

Create the default libvirtd storage pool for root:

sudo virsh pool-define-as default dir --target $images
sudo virsh pool-autostart default
sudo virsh pool-start default

Deploy the example machine

Create and deploy the trivial example:

nixops create -d example-libvirtd examples/trivial-virtd.nix
nixops deploy -d example-libvirtd

Your new machine doesn't do much by default, but you may connect to it by running:

nixops ssh -d example-libvirtd machine
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].