docs: add CPU and memory hotplug how-to for virtual machines#979
Merged
Conversation
Verified live on CentOS 7.9 / Ubuntu 20.04 / Debian 13 guests: hotplug is delivered via automatic live migration; CPU auto-online is RHEL-only; memory hotplug (virtio-mem) needs guest kernel 5.16+ (QEMU requires UNPLUGGED_INACCESSIBLE), pending requests apply on next restart; reductions set RestartRequired. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…plug VMs sized via resources.requests/limits (the web console form) lack the cpu/memory spec fields; adding them is a non-live-updatable change that sets RestartRequired. Verified live. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying alauda-container-platform with
|
| Latest commit: |
bee468c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f631fff1.alauda-container-platform.pages.dev |
| Branch Preview URL: | https://docs-vm-cpu-memory-hotplug.alauda-container-platform.pages.dev |
CPU hotplug: hot-added vCPUs are used immediately (verified on Standard edition, live session). Memory hotplug: no Windows virtio-mem driver exists — the device sits in Device Manager with a driver error and the request stays pending until a cold restart. Also document cancelling a pending memory request by reverting memory.guest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iomem, per-resource first resize All six review findings verified against the shipped KubeVirt v1.8.4 source and re-tested on a live cluster before rewriting: - Memory CAN be scaled down live as long as the target stays >= guestAtBoot (verified Debian 13 4Gi->3Gi and Windows 10Gi->9Gi->8Gi online); only going below the boot value sets RestartRequired. CPU reduction still always does. - Windows memory hotplug WORKS once the viomem driver from the platform's virtio-win ISO (0.1.266 ships viomem for 2k16-2k25) is installed — verified live 8Gi->10Gi with pnputil-installed driver. Rewrote the 'no Windows driver' claim and added install instructions. - First resize of a console-created (resources-only) VM: adding memory.guest alone is live; only adding the cpu block needs one restart — and a combined patch suppresses the live memory path too (all three cases verified). - maxSockets/maxGuest are auto-computed at VMI start when omitted; reworded the contradictory 'must declare before start' prerequisite. - Replaced the bare 'kernel 5.16+' rule with feature-negotiation guidance: distro kernels backport independently (RHEL 9.4+/8.10 work; Ubuntu 22.04 GA 5.15 does NOT — corrected the previous 22.04+ recommendation). - RWX prerequisite scoped to PVC/DataVolume-backed disks with LiveMigratable as the real gate; dmesg troubleshooting no longer equates 'no output' with 'kernel too old'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wp7GTjNPrAwPJpzmHNgn5
…st policy, scope claims to tested guests - Memory scale-down reworded as a best-effort request: accepted live (no RestartRequired at >= guestAtBoot) but completion depends on the guest freeing the memory. Verified live: under artificial memory pressure a Debian 13 shrink stalled at ~2.1Gi of a 2Gi request with no error, and ~86Mi stayed unreclaimable even after the pressure was removed. - Debian's automatic memory onlining attributed to the image's kernel policy (auto_online_blocks=online, verified in-guest), not to the virtio-mem driver; added the check command. - Troubleshooting split by direction: guestRequested>guestCurrent (driver/ feature/onlining) vs guestRequested<guestCurrent (unmovable/locked pages, may never fully complete, not an error). - CPU guidance scoped to the four tested guests; Windows limited to Windows Server 2022 with a note that CPU hot-add depends on dynamic-hardware-partitioning support in specific SKUs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wp7GTjNPrAwPJpzmHNgn5
…r states, verified-vs-documented scope Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wp7GTjNPrAwPJpzmHNgn5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a how-to under
virtualization/virtual_machine/how_to/covering CPU and memory hotplug for running VMs, based on live verification on an ACP 4.4 test cluster (HCO v4.4.3 / KubeVirt v1.8.4) with CentOS 7.9, Ubuntu 20.04, Debian 13, and Windows Server 2022 guests. Two review rounds have been incorporated; every corrected statement was re-verified against the shipped KubeVirt v1.8.4 source and/or live tests.Key verified findings documented:
LiveMigratable=True— RWX is required for PVC/DataVolume-backed disks only.maxSockets/maxGuestare auto-computed at VMI start when omitted (default 4×, configurable); explicit values remain recommended.UNPLUGGED_INACCESSIBLEfeature — upstream kernel 5.16+, but distributions backport independently (RHEL 9.4+ and 8.10 work — though 8.10 is hot-plug only by default; Ubuntu 22.04 GA 5.15 does not). Windows Server 2022 works once theviomemdriver from the platform's virtio-win ISO (0.1.266) is installed — verified live 8Gi→10Gi online; without it the request stays silently pending and applies cold on the next restart.RestartRequired.memory.guestalone is applied live; the first addition of acpublock requires one restart, and a combined patch suppresses the live memory path too.Validation
yarn lint— 0 errors / 0 warningsyarn build— passed🤖 Generated with Claude Code
https://claude.ai/code/session_018wp7GTjNPrAwPJpzmHNgn5