-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hey,
I did some progress on this which you can see here https://github.com/tieong/proxmox-nixos/tree/fix/make-lxc-works (not mergeable needs to be rebased to be cleaner).
I can create the container with the pct command line succesfully however I did not manage to start it.
The command I used to create is the following:
# Note that to be able to download the container templates I had to first do this to be able to download from the web ui/pveam cli
mkdir -p /usr/share/doc/pve-manager/
wget http://download.proxmox.com/debian/proxmox-release-bookworm.gpg
mv proxmox-release-bookworm.gpg /usr/share/doc/pve-manager/trustedkeys.gpg
wget https://github.com/turnkeylinux/turnkey-keyring/raw/master/turnkey-release-keyring.gpg
gpg --no-default-keyring --keyring /usr/share/doc/pve-manager/trustedkeys.gpg --import turnkey-release-keyring.gpg
pveam update
pveam list
pct create 99999 --description alpine-template local:vztmpl/alpine-3.21-default_20241217_amd64.tar.xz -ostype alpine -net0 name=eth0 -storage local
It complains about pve-container service missing, I see that we have some code for that here https://github.com/SaumonNet/proxmox-nixos/blob/main/modules/proxmox-ve/container.nix but doesn't gets created for some reason?
Does it only gets created if the lxc service starts successfully? I did try to start it manually but it seems it is missing some coreutils?
Finally the lxc config that we generate is currently incorrect, it generates something like this:
lxc.include = /nix/store/q3qsr9wp5vc8w4h9vhp24mhz462yv0ky-pve-container-5.2.2/share/lxc/config/common.conf
while it should be
/nix/store/q3qsr9wp5vc8w4h9vhp24mhz462yv0ky-pve-container-5.2.2/share/lxc/config/common.conf.d/01-pve.conf
This stems from this line https://github.com/proxmox/pve-container/blob/master/src/PVE/LXC.pm#L673 and needs to be patched.
Also I found that the lxc-start is not very talkative when failing, It was much more useful when using the following options:
/nix/store/sqyzbxxi74c7g5h11bbxc5xbpv8nqpar-lxc-6.0.4/bin/lxc-start -F -n 99999 --logfile failure --logpriority TRACE


