The Debian-12 (systemd 252) unprivileged create emits a "you may need to enable nesting" warning, which Proxmox returns as TASK WARNINGS:1 and bpg treats as a failed apply. nesting/keyctl on an unprivileged CT need only VM.Allocate (which the API token has) — not root@pam — so set them in TF. Only bind mounts genuinely require root@pam/console. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
68 lines
1.8 KiB
HCL
68 lines
1.8 KiB
HCL
# Download Debian 12 LXC template to gihyeon (node1).
|
|
resource "proxmox_virtual_environment_download_file" "debian12_template_gihyeon" {
|
|
content_type = "vztmpl"
|
|
datastore_id = "local"
|
|
node_name = var.hermes_node
|
|
url = "http://download.proxmox.com/images/system/debian-12-standard_12.12-1_amd64.tar.zst"
|
|
}
|
|
|
|
# Hermes Agent LXC.
|
|
# `features` (nesting/keyctl) ARE set here: on an unprivileged container these need
|
|
# only VM.Allocate, which the API token has, so Terraform can set them. nesting is
|
|
# also required so the systemd-252 (Debian 12) create does not emit the "enable
|
|
# nesting" warning that Proxmox returns as TASK WARNINGS (which fails the apply).
|
|
# Bind mounts (mp0/mp1, host paths) genuinely DO require root@pam, so those are still
|
|
# added via the PVE web console with `pct set` (see scripts/hermes-bootstrap.sh and
|
|
# docs/superpowers/specs/2026-06-18-hermes-agent-lxc-design.md).
|
|
resource "proxmox_virtual_environment_container" "hermes" {
|
|
description = "Hermes Agent (Nous Research) - Managed by Terraform"
|
|
node_name = var.hermes_node
|
|
vm_id = var.hermes_vmid
|
|
start_on_boot = true
|
|
unprivileged = true
|
|
tags = ["ai", "agent", "terraform"]
|
|
|
|
features {
|
|
nesting = true
|
|
keyctl = true
|
|
}
|
|
|
|
operating_system {
|
|
template_file_id = proxmox_virtual_environment_download_file.debian12_template_gihyeon.id
|
|
type = "debian"
|
|
}
|
|
|
|
cpu {
|
|
cores = var.hermes_cores
|
|
}
|
|
|
|
memory {
|
|
dedicated = var.hermes_memory
|
|
swap = var.hermes_swap
|
|
}
|
|
|
|
disk {
|
|
datastore_id = var.hermes_datastore
|
|
size = var.hermes_disk_size
|
|
}
|
|
|
|
network_interface {
|
|
name = "eth0"
|
|
bridge = var.hermes_network_bridge
|
|
}
|
|
|
|
initialization {
|
|
hostname = var.hermes_hostname
|
|
|
|
ip_config {
|
|
ipv4 {
|
|
address = "dhcp"
|
|
}
|
|
}
|
|
|
|
dns {
|
|
servers = var.dns_servers
|
|
}
|
|
}
|
|
}
|