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?

@Freebien
Copy link

@dmacvicar this one would be of great help to use arm64 easily

@localghost
Copy link
Contributor

@Freebien

If that would be of help then https://registry.terraform.io/providers/localghost/libvirt/0.1.0 is v0.8.3 with this PR applied.

Please don't use v0.2.0, it has some experimental changes included additionally.

@Freebien
Copy link

@Freebien

If that would be of help then https://registry.terraform.io/providers/localghost/libvirt/0.1.0 is v0.8.3 with this PR applied.

Please don't use v0.2.0, it has some experimental changes included additionally.

Thanks, I'll do that for the time being I think !

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.

4 participants