Nixos-install on VirtualBox produces no output at all, but is using CPU for hours

So I wanted to first try NixOS on Virtualbox before installing it on my machine. The machine setup I wanted to have is zfs with mirroring and encryption (I followed this article Encrypted ZFS mirror with mirrored boot on NixOS).

When setting everything up - namely, disk partitioning and other things mentioned in the article above) - everything went fine. However, on the last step, when I run nixos-install - it just sort of freezes. The CPU keeps doing something for hours (I waited 2,5 hours), I can see that - but literally NO OUTPUT is being produced. I tried running nixos-install -v -L for verbose output - but there’s still nothing. There are no errors or anything that would hint at misconfiguration.

Does anyone have any idea how to diagnose this?

Maybe it is caused because the virtual machine doesn’t have enought RAM (as evaluation of nixpkgs take approx 1-2GiB of ram on my machine). The VM may be trying to use swap, and swap is really slow.

what does

 nixos-install -vvvvv 

give you?

also you can always monitor what nixos-install is doing from another shell.

if you have enabled a swap device, and can see it with

/dev/sdc2 partition   14.9G 55.8M   -2

and it’s being used, then add more ram :-).