Repository navigation
Conversation
Without a topology, libvirt shows each vCPU to the guest as a separate processor with one core. Windows 10 and 11 use at most two processors, so a VM with cpus: 10 ran on 2. The domain now shows one processor with cpus cores.
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
A VM with
cpus: 10running Windows 11 reports only 2 CPUs (NUMBER_OF_PROCESSORS=2).Without a
<topology>element, libvirt shows each vCPU to the guest as a separate physical processor with one core, socpus: 10looks like a machine with ten single-core processors. Windows 10 and 11 (Home, Pro, Enterprise) use at most two physical processors, so the guest uses two cores and ignores the rest. Linux guests use every vCPU either way.This shows the vCPUs as one processor with
cpuscores:In libvirt's terms,
socketsis the number of physical processors. The VM still has the same number of vCPUs; only the layout the guest sees changes.Closes #49
Test plan
make test,golangci-lint run(2.15.0),gofmt -scpus: 10on Ubuntu 26.04 / libvirt 12.0.0: 2 CPUs before, 10 after