mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-24 22:56:01 +03:00
[GH-ISSUE #211] Setting 'vcpus' to 0 not supported? #117
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @szinn-inett on GitHub (Jun 18, 2025).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/211
Hii, while attempting to set the 'vcpus' property on a Template to 0, I keep getting the same response:
Code:
proxmox_conn.proxmox.nodes(node).qemu(proxmox_id).config.put(vcpus=0)Response:
400 Bad Request: Parameter verification failed. - {'vcpus': 'value must have a minimum value of 1'}This is despite the PVE documentation stating that the default value for this param is 0. (PVE docs here)
I also tried setting it to None but that didn't work either (to be expected) and this was the response:
500 Internal Server Error: no options specifiedIs this a bug in the wrapper or is there another intended way to do this?
@i-am-jmn commented on GitHub (Aug 28, 2025):
Hi, this is not related to Proxmoxer. As you can read in the docs, it requires at least 1 vCPU. You need to set a default value to be at least 1 vCPU.
@phauch commented on GitHub (Dec 1, 2025):
@i-am-jmn According to the API specification at:
https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu/{vmid}/config
Proxmox lists the default value of vcpus as 0, but simultaneously enforces the value to be " (1 - N)".
This means that 0 is not a valid value and must be interpreted as null / not set.
You can observe this behavior in the Proxmox web interface.
If you add a vCPU value to a VM’s processor configuration, the following request is sent:
Response
If you then clear the vcpus field in the web interface, Proxmox sends the following request:
Response
As you can see, the web interface simply omits the vcpus parameter when clearing it.
In addition, Proxmox includes vcpus in the
deletefield of the PUT request to explicitly instruct Proxmox to remove this parameter.As far as I know, there is currently no way in Proxmoxer to instruct it to remove the vcpus field in a PUT config request. If I’m mistaken, please feel free to correct me.