Skip to content

Configure Proxmox hosts, virtual machines, and containers

After provisioning a Proxmox host, you initialize it with Terraform. The initialization process creates users, roles, and API tokens for the following stages, and persists API tokens in Terraform variables files.

Terraform handles:

  • The configuration of Proxmox hosts.
  • The provisioning of Proxmox virtual machines (VMs) and LXC containers.

From your Linux shell, after setting the working directory to the root of this repository:

  1. Open the operations Nix shell, if needed:

    nix develop ./config/nix#operations
    
  2. Apply changes with Terraform:

    scripts/run-terraform.sh
    

    To enable the configuration of the Proxmox IAM, create the following files: - config/terraform/environments/proxmox-pve1-root-secrets.tfvars to store the root credentials (password or API token).

Configure NixOS virtual machines and containers

  1. Open the operations Nix shell, if needed:

    nix develop ./config/nix#operations
    
  2. Run the host configuration script:

    scripts/bootstrap-host.sh "<hostname>" "<host-mac-address>"