You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "nimbustech-lab (via GitHub)" <gi...@apache.org> on 2025/11/20 03:54:06 UTC
[I] Live scaling fails with “unhandled exception” when cpu.corespersocket is set (need support for consistent CPU sockets) [cloudstack]
nimbustech-lab opened a new issue, #12108:
URL: https://github.com/apache/cloudstack/issues/12108
### problem
I’m trying to enforce a consistent CPU socket configuration across VMs by using the global setting cpu.corespersocket.
However, when this setting is enabled, live CPU scaling fails with the message:
`unhandled exception`
If I remove the setting cpu.corespersocket, the same VM live-scales successfully, so the issue is directly related to that parameter.
For some environments (especially those with CPU-based licensing tied to sockets), it is important to make sure that the socket count is always fixed (e.g., always 2 sockets regardless of the number of cores assigned).
At the moment, CloudStack does not seem to reliably honor or handle this setting during live scaling operations.
### versions
Apache CloudStack: 4.22.0
Hypervisor: VMware vCenter + ESXi
Infrastructure: Standard VMware cluster, shared storage
VM type: User instance with dynamic scaling enabled
### The steps to reproduce the bug
1. Set the setting on any VM/instance:
> `cpu.corespersocket = 2`
2. Turn on the VM/instance
3. Scale VM/instance
4. `Unhandled exception` error pops up
### What to do about it?
- Please confirm whether the cpu.corespersocket setting is fully supported for VMware live scaling.
- If this is a bug, kindly update VM reconfigure logic to correctly compute:
`cores = total_vcpu / cpu.corespersocket`
`sockets = cpu.corespersocket`
- If this is a limitation, please advise if CloudStack can support a feature to force a fixed socket count (e.g., always 2 sockets) regardless of vCPU changes.
- This is important for environments that rely on socket-based licensing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Live scaling fails with “unhandled exception” when cpu.corespersocket is set (need support for consistent CPU sockets) [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #12108:
URL: https://github.com/apache/cloudstack/issues/12108#issuecomment-3696155925
@abh1sar this one is worth checking in 20 as well. (setting for 22.1 for now)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Live scaling fails with “unhandled exception” when cpu.corespersocket is set (need support for consistent CPU sockets) [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12108:
URL: https://github.com/apache/cloudstack/issues/12108#issuecomment-4856145754
## 🎯 Triage report
Live CPU scaling fails with an "unhandled exception" on VMware when the `cpu.corespersocket` setting is applied to a VM. Removing the setting allows scaling to succeed. The root cause is that the VMware VM-reconfigure path does not correctly calculate the `numCoresPerSocket` / `numCPUs` split when this parameter is present during a live-scale operation. This is important for environments that enforce socket-based licensing.
### 📊 Assessment
| Dimension | Value | Reasoning |
|---|---|---|
| **Type** | type:bug | Live scaling is a supported feature; it breaks with a documented global setting |
| **Component** | component:vmware, component:compute | VMware VM reconfigure logic for CPU topology |
| **Severity** | Severity:Major | Live scaling completely fails for all VMs in environments using `cpu.corespersocket` |
| **Labels** | type:bug, component:vmware, component:compute, Severity:Major | As above |
| **Coding agent** | Suitable | Root cause and fix formula clearly described; self-contained to VMware `scaleVmTo` / `reconfigureVm` code path |
<details><summary>💡 Notes and suggestions</summary>
- Fix: in the VMware scale VM path, when `cpu.corespersocket` is set, compute `numCoresPerSocket = cpu.corespersocket` and `numCPUs = totalVcpu` (i.e. `sockets = totalVcpu / cpu.corespersocket`, `numCPUs = totalVcpu`).
- Relevant code: `VmwareHelper` / `VirtualMachineMgrImpl` — search for `scaleVirtualMachine` and the VMware `VirtualMachineConfigSpec` builder.
- Also confirmed as worth back-porting to 4.20 by `@DaanHoogland`.
- Steps to reproduce: set `cpu.corespersocket = 2` on any running VMware VM, then scale CPU up/down — error occurs immediately.
</details>
> Generated by [Daily Issue Triage](https://github.com/apache/cloudstack/actions/runs/28523943189) · [◷](https://github.com/search?q=repo%3Aapache%2Fcloudstack+%22gh-aw-workflow-call-id%3A+apache%2Fcloudstack%2Fdaily-issue-triage%22&type=issues)
>
<details>
<summary>Add this agentic workflows to your repo</summary>
To install this agentic workflow, run
```
gh aw add githubnext/agentics/workflows/daily-issue-triage.md@d7c1dc4b72b00607a67caaffdcc216cb64379cf9
```
</details>
<!-- gh-aw-agentic-workflow: Daily Issue Triage, engine: copilot, version: 1.0.52, model: claude-sonnet-4.6, id: 28523943189, workflow_id: daily-issue-triage, run: https://github.com/apache/cloudstack/actions/runs/28523943189 -->
<!-- gh-aw-workflow-call-id: apache/cloudstack/daily-issue-triage -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org