Description:
The problem is related to the CPU type Nehalem, which is either incorrectly handled or missing in the Proxmox API.
Details:
When trying to specify Nehalem (the correct CPU name) in a Proxmox VM configuration via the Proxmox API, the following error occurs:
Error: cpuType can only be one of the following values: '486, Broadwell, Cascadelake-Server, Conroe, EPYC, Haswell, Icelake-Server, IvyBridge, KnightsMill, Nahalem, Nahalem-IRBS, ...'
When trying to use Nahalem (which is an incorrect spelling but listed in the API), the following error is returned by Proxmox 7.4:
error: error updating VM: 400 Parameter verification failed., error status: {"data":null,"errors":{"cpu":"invalid format - Built-in cputype 'Nahalem' is not defined"}}
Steps to Reproduce:
Define a Proxmox VM using the API with the following configuration:
resource "proxmox_vm_qemu" "example" {
...
cpuType = "Nehalem" # Correct CPU type name
...
}
Run the configuration and observe the error related to valid CPU types.
Alternatively, try using Nahalem, which leads to an error from Proxmox 7.4 due to the API not recognizing it as a valid CPU type.
Expected Behavior:
The Proxmox API should correctly handle Nehalem as a valid CPU type, consistent with the actual CPU architecture used in Proxmox and QEMU/KVM environments.
Actual Behavior:
The API incorrectly lists Nahalem, which leads to an error when applied to Proxmox 7.4, as the hypervisor does not recognize this CPU type.
Suggested Fix:
The Proxmox API should be updated to include Nehalem as a valid CPU type in its configuration, removing the incorrect Nahalem listing. The API should provide correct CPU types to the provider.
Description: The problem is related to the CPU type Nehalem, which is either incorrectly handled or missing in the Proxmox API.
Details:
When trying to specify
Nehalem
(the correct CPU name) in a Proxmox VM configuration via the Proxmox API, the following error occurs:This happens because
Nehalem
is not listed as a valid option in the proxmox-api-go https://github.com/Telmate/proxmox-api-go/blob/b149708f750b75dbb4e332322d7cdba6fc4c0c38/proxmox/config_qemu_cpu.go#L290When trying to use
Nahalem
(which is an incorrect spelling but listed in the API), the following error is returned by Proxmox 7.4:Steps to Reproduce:
Nahalem
, which leads to an error from Proxmox 7.4 due to the API not recognizing it as a valid CPU type.Expected Behavior: The Proxmox API should correctly handle
Nehalem
as a valid CPU type, consistent with the actual CPU architecture used in Proxmox and QEMU/KVM environments.Actual Behavior: The API incorrectly lists
Nahalem
, which leads to an error when applied to Proxmox 7.4, as the hypervisor does not recognize this CPU type.Suggested Fix: The Proxmox API should be updated to include
Nehalem
as a valid CPU type in its configuration, removing the incorrectNahalem
listing. The API should provide correct CPU types to the provider.