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 !

@dmacvicar dmacvicar changed the base branch from main to v0.8 November 8, 2025 00:12
@dmacvicar
Copy link
Owner

ℹ️ ℹ️ ℹ️ ℹ️ ℹ️ ℹ️

This contribution is relevant to the legacy version of the provider, which is now in the v0.8 branch of this repository.

Future development is based on a new provider, which is not compatible with this one, nor does share code.

As the new provider solves many issues with the legacy, and to make development in my free time more enjoyable, I have decided to close all PRs for the legacy provider, and to ask to check if the contribution would apply to the new one. This also to encourage trying the new version.

and check the documentation:

You are free to reopen the PR for v0.8, which is targetted now to the v0.8 branch. We may also start a discussion if we can assemble a team of maintainters for the legacy branch. My efforts will go into the new provider.

I ask you to check the new provider and re-evaluate this contribution. 🙏

@dmacvicar dmacvicar closed this Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants