Hello all,
I am working on setting up a NixOS LXC container in Proxmox 8.1. I downloaded both Hydra - Build 247009785 of job nixos:release-23.11:nixos.containerTarball.x86_64-linux and Hydra - Build 247009460 of job nixos:release-23.11:nixos.lxdContainerImage.x86_64-linux to try out.
I kept getting an error:
unable to open file '/etc/systemd/network/eth0.network.tmp.2776' - No such file or directory
unable to create CT 15003 - error in setup task PVE::LXC::Setup::post_create_hook
So I took a look at the PVE source code, and it appears to try to set up networking using systemd-networkd
: [PATCH v2 container 1/1] Setup: add NixOS support. When commenting out the line $self->setup_systemd_networkd($conf);
in /usr/share/perl5/PVE/LXC/Setup/NixOS.pm
the container successfully initiates.
I found out how to do this, because most guides online say to pass --os-type unmanaged
which has no networking setup. The downside to this is that I cannot pass this option in the Web GUI, because there is no option to enable to pass this argument.
The rest of the options that are typically recommended for Proxmox containers are able to be passed during (nesting) or after (console) the creation of the container in the Web GUI, but this systemd-networkd
error will actually stop the creation of the container, preventing me from intervening manually later.
The workarounds AFAIK are to create the container using pct
on the CLI, (which I have been able to do) or to create a container that uses systemd-networkd
(which I have not tried yet). However, I would hope that there is a smoother way to use the provided builds to create a container on the Proxmox GUI as it is described on Proxmox Virtual Environment - NixOS Wiki. (Albeit it does suggest to create the image yourself. Like I said, I have not tried this yet, but I don’t have the nix
command installed on my desktop to attempt to create a proxmox-lxc
image on my own desktop, )
So I’m wondering the following:
- Is there a container build (hosted, maybe on hydra?) that has
systemd-networkd
enabled (doesproxmox-lxc
do this?) so this setup passes? - Should this Proxmox script be changed so that the Proxmox setup does not try to set up the network via
systemd-networkd
?
Thanks for your time!