Skip to content

Resource: proxmox_custom_cpu_model

Manages a custom CPU model, a cluster-wide CPU type that VMs can use. Reference it from a VM's cpu.type through the cputype attribute.

Example Usage

resource "proxmox_custom_cpu_model" "vermeer" {
  id             = "RYZEN-Vermeer-v3"
  reported_model = "EPYC-Milan-v3"
  flags          = ["-pcid"]
  phys_bits      = "48"
}

# Reference the model from a VM through its prefixed CPU type:
#
# cpu {
#   type = proxmox_custom_cpu_model.vermeer.cputype
# }

Schema

Required

  • id (String) The name of the custom CPU model, without the custom- prefix.
  • reported_model (String) The CPU model and vendor reported to the guest. Must be a model supported by QEMU/KVM, e.g. EPYC-Milan-v3.

Optional

  • flags (List of String) CPU flags to enable (+FLAG) or disable (-FLAG), e.g. ["-pcid", "+aes"].
  • guest_phys_bits (Number) The number of physical address bits available to the guest (32-64).
  • hidden (Boolean) Whether to hide that the CPU is a KVM virtual machine from the guest. Only affects vCPUs with x86-64 architecture.
  • hv_vendor_id (String) The Hyper-V vendor ID reported to the guest (1-12 alphanumeric characters).
  • level (Number) The maximum input value for the basic CPUID leaves the guest can query. Only applies when the vCPU architecture is x86-64.
  • phys_bits (String) The number of physical address bits reported to the guest (8-64), or host to use the host CPU's value.

Read-Only

  • cputype (String) The CPU type to use in a VM's cpu.type: the name with the custom- prefix.

Import

Import is supported using the following syntax:

#!/usr/bin/env sh
# The name may be given with or without the `custom-` prefix.
terraform import proxmox_custom_cpu_model.vermeer RYZEN-Vermeer-v3