Skip to content

Conversation

NamelessOne91
Copy link

Related to:

Adds support for defining model and topology blocks on a libvirt domain's CPU.
This is possible with 2 limitations:

  • to define a model, the CPU mode must be set to "custom"
  • sockets * threads * cores must be <= to the number of vCPU

Example:

resource "libvirt_domain" "test-domain" {
    name = "test"
    vcpu = 4
    cpu  {
        mode = "custom"
        model {
            fallback = "forbid"
            value = "EPYC"
            vendor_id = "AuthenticAMD"
        }
        topology {
            sockets = 1
            cores = 2
            threads = 2
        }
    }
}

@NamelessOne91 NamelessOne91 marked this pull request as ready for review November 25, 2024 10:37
@bradthebuilder
Copy link

I wasn't able to get a aarch64 VM to spawn until I tried using this PR. Worked like a charm!

@localghost
Copy link
Contributor

@dmacvicar any plans to iterate "over interesting PRs and do minor improvements" (specifically this one) in the near future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants