Spin up virtual machines with any Linux distribution?

Hello, what is a good, modern way to create and easily manage multiple virtual machines with different distributions on NixOS?

For example one completely isolated environment for Debian, one for ArchLinux, and so on…

I do not know if this is possible, but it would be very cool to have the vms declaratively set up, somewhere in my configuration.

Thank you in advance! :slight_smile:

6 Likes

There’s none to the best of my knowledge except for things like distrobox which are not declarative or integrated in NixOS.

3 Likes

It would be awesome if someone wrote a tool to declaratively manage them and also have it well integrated in NixOS. I am not sure how hard that would be though.

1 Like

For “normal” distros stuff like Vagrant and Ansible is probably the easiest way to go.
However they don’t really integrate with NixOS.

2 Likes

Then we really need a tool for NixOS :slight_smile:

There is a tool by Martin Wimpress named quickemu (which has a release in nixpkgs) that allows for imperative command-line installation of various distros (see GitHub - quickemu-project/quickemu: Quickly create and run optimised Windows, macOS and Linux desktop virtual machines.)

Martin apparently just started to work for Determinate Systems, so I wouldn’t be suprised if quickemu got some nix integration eventually.

7 Likes

Uh nice, since it got quite some features since I last used it.
At the beginning you had to provide the ISOs manually.

1 Like