I’m trying to follow the instructions in Proxmox Linux Container - NixOS Wiki for creating a Proxmox lxc running NixOS[1]. I can get pretty far in the instructions but in the end, despite the lxc starting with no errors, I can’t open a console or shell on it. I just get black. Here are my steps:
Locally:
export RELEASE=21.11
export BUILDID=166445692
mv nixos-system-x86_64-linux.tar.xz nixos-${RELEASE}-default_${BUILDID}_amd64.tar.xz
Then on my Proxmox host (after uploading the .tar.xz):
pct create $(pvesh get /cluster/nextid) \
--description nixos-template \
--hostname nixos-template \
holodeck4:vztmpl/nixos-21.11-default_166445692_amd64.tar.xz \
--arch amd64 \
--ostype unmanaged \
--net0 name=eth0,ip=dhcp,bridge=vmbr0,firewall=1 \
--storage local-zfs \
--unprivileged true \
--features nesting=1
If I try to start this lxc it starts, but then I just get black in the console:
Things I’ve tried:
- Adding
lxc.init.cmd: /sbin/init
to the VMID.conf file - privileged/unprivileged lxc
- nesting on and off
Anyone have an idea what I might be doing wrong?
Note: I’m on PVE 7.1-10
[1] This is part of bootstrapping my use of NixOS: by having the lxc I get access to nix-build
which will help me build a custom Live CD that has my ssh key (Creating a NixOS live CD - NixOS Wiki).