Archived
LXC containers share the host kernel — Proxmox starts them by exec'ing /sbin/init directly in the container's rootfs, no bootloader or initrd involved at all. Without boot.loader.initScript.enable, that file isn't wired to launch the current generation, so even a correctly installed system (see the nix-auto-installer bind-mount fix, same underlying issue) could still fail to come up after reboot. This is exactly what nixpkgs' own virtualisation/proxmox-lxc.nix module sets for the same reason. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
446 B
Nix
15 lines
446 B
Nix
{ ... }:
|
|
|
|
{
|
|
boot.isContainer = true;
|
|
|
|
boot.loader.grub.enable = false;
|
|
boot.loader.systemd-boot.enable = false;
|
|
|
|
# LXC containers share the host kernel — Proxmox starts them by exec'ing
|
|
# /sbin/init directly, no bootloader/initrd involved. Without this, that
|
|
# file doesn't correctly launch the current generation, so even a
|
|
# correctly-installed system can fail to come up after reboot.
|
|
boot.loader.initScript.enable = true;
|
|
}
|