Skip to content

Conversation

@tpressure
Copy link
Member

No sane guest OS will allow hotplugging all cpus.
However, the REST API currently allows specifying ch-remote resize --cpus 0, contrary to what is specified.

On Linux, we can then observe the following error in the kernel log:

processor cpu0: Offline failed.

Subsequent resize commands via ch-remote will then fail with VcpuPendingRemovedVcpu because the removal of cpu0 was never successful.

Fix this by disallowing resizing to zero vCPUs.

@tpressure tpressure requested a review from a team as a code owner May 21, 2025 14:23
No sane guest OS will allow hotplugging all cpus.
However, the REST API currently allows specifying
`ch-remote resize --cpus 0`.

On Linux, we can then observe the following error in the kernel log:

processor cpu0: Offline failed.

Subsequent resize commands via ch-remote will then fail with
VcpuPendingRemovedVcpu because the removal of cpu0 was never
successful.

Fix this by disallowing resizing to zero vCPUs.

Signed-off-by: Thomas Prescher <[email protected]>
On-behalf-of: SAP [email protected]
@tpressure tpressure force-pushed the disallow_zero_vcpus branch from 471b327 to 2ec5ca2 Compare May 21, 2025 14:26
@rbradford
Copy link
Member

Thanks!

@rbradford rbradford added this pull request to the merge queue May 21, 2025
Merged via the queue into cloud-hypervisor:main with commit d465175 May 21, 2025
38 of 39 checks passed
@likebreath likebreath added bug Something isn't working bug-fix Bug fix to include in release notes and removed bug Something isn't working labels May 21, 2025
@likebreath likebreath moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants