[GH-ISSUE #211] Setting 'vcpus' to 0 not supported? #117

Open
opened 2026-02-27 15:46:31 +03:00 by kerem · 2 comments
Owner

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 specified

Is this a bug in the wrapper or is there another intended way to do this?

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](https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config)) 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 specified` Is this a bug in the wrapper or is there another intended way to do this?
Author
Owner

@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.

<!-- gh-comment-id:3232849953 --> @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.
Author
Owner

@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:

PUT https://pve01.tld:8006/api2/extjs/nodes/pve01/qemu/100/config

sockets=2
cores=2
vcpus=2
numa=0
cpu=x86-64-v2-AES
delete="cpuunits,cpulimit"
digest=da7546ed7ee0787c16a91fbdfd57d0b4eb265e42

Response

{"data": null, "success": 1}

If you then clear the vcpus field in the web interface, Proxmox sends the following request:

PUT https://pve01.tld:8006/api2/extjs/nodes/pve01/qemu/100/config

sockets=2
cores=2
numa=0
cpu=x86-64-v2-AES
delete="vcpus,cpuunits,cpulimit"
digest=5af1eefec9bfd030945ac90cdb0cf358dd55fe4d

Response

{"data": null, "success": 1}

As you can see, the web interface simply omits the vcpus parameter when clearing it.
In addition, Proxmox includes vcpus in the delete field 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.

<!-- gh-comment-id:3595947280 --> @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 "<integer> (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: ``` PUT https://pve01.tld:8006/api2/extjs/nodes/pve01/qemu/100/config sockets=2 cores=2 vcpus=2 numa=0 cpu=x86-64-v2-AES delete="cpuunits,cpulimit" digest=da7546ed7ee0787c16a91fbdfd57d0b4eb265e42 ``` Response ``` {"data": null, "success": 1} ``` If you then clear the vcpus field in the web interface, Proxmox sends the following request: ``` PUT https://pve01.tld:8006/api2/extjs/nodes/pve01/qemu/100/config sockets=2 cores=2 numa=0 cpu=x86-64-v2-AES delete="vcpus,cpuunits,cpulimit" digest=5af1eefec9bfd030945ac90cdb0cf358dd55fe4d ``` Response ``` {"data": null, "success": 1} ``` As you can see, the web interface simply omits the vcpus parameter when clearing it. In addition, Proxmox includes vcpus in the `delete` field 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#117
No description provided.