mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[GH-ISSUE #360] CPULimit of ConfigLxc should be of type float, not int. #88
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#88
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 @Sonlis on GitHub (Aug 29, 2024).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/360
As the (documentation)[https://proxmox.bastincloud.local:8006/pve-docs/chapter-pct.html#pct_cpu] states,
cpulimitcan be a floating number:Because the field
CPULimithere:github.com/Telmate/proxmox-api-go@0d787afdba/proxmox/config_lxc.go (L21)is of type int, the user cannot input a floating point number.@Tinyblargon commented on GitHub (Aug 30, 2024):
Currently a rework of LXC is ongoing #336, If this is an issue you need fixed please create a pull request, as my efforts are needing for the rewrite (this rewrite will take a long time).
@Tchoupinax commented on GitHub (Dec 8, 2025):
Hello,
I am looking into the same question for Qemu VMs. Using the SDK, we can only provide an integer from 0 to 128, while the Proxmox API expects a floating-point value where 1.0 means 100%.
Could you confirm whether setting
limit = 2with the SDK really means200%for Proxmox?@Tinyblargon commented on GitHub (Dec 8, 2025):
For LXC this issue has been fixed and is implemented at:
github.com/Telmate/proxmox-api-go@81c14ce502/proxmox/config__lxc__cpu.go (L131-L132)For Qemu this has been implemented incorrectly as it is implemented as an int instead of a float.
@Tchoupinax for Qemu
limit = 2does indeed mean200%The GUI only allows 2 digits of precision. Maybe we should implement this as a percentage directly so
100means100%in PVE.