On 1/13/25 10:45, Daniel Herzig wrote:
I just tested this patch and think it gives very valuable information.
Thanks for taking a look at this and sorry for taking some time to get
back to this.
One thing I noticed, more by chance than intentional -- if the host has
a lower cpu-count than the count configured for the VM, the stats will
not be updated. E.g. my pve-host only has 2 cores available and if I
configure 4 cores for the VM, `qm list` will still show 2 cores,
although the VM is actually configured in an unbootable state.
Do you think it's possible to render something like '$NUMBER:
too_many_for_this_host' (or something similar) in this edge case?
Thanks for pointing this out!
That's interesting, in `vmstatus` we're clamping the `$cpus` property to
the maximum available cpu core count if `$sockets * $cores` above that.
But if `$vcpus` is set to something greater than that, it won't be
clamped to the maximum amount.
I've discussed this off-list with @Hannes Dürr: We've argued that this
would overbloat the `qm list` as `vmstatus` returns the clamped `$cpus`
count and we'd need to duplicate the unclamped calculation, especially
as you also pointed out that the VM is in an unbootable state.
What do you think about fixing the problem from the other side: I could
do a follow up where it's not possible to actively assign a VM more
resources than currently available, since it would not boot anyway? I
think there's a negligible amount of users who'd want to configure more
resources and only later upgrade to the required primary memory or a
heavier CPU (wrt to their core count).
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel