terraform-provider-libvirt icon indicating copy to clipboard operation
terraform-provider-libvirt copied to clipboard

xml parameter or match, model, check are not available under cpu block for a domain

Open tiagovdaa opened this issue 1 year ago • 2 comments
trafficstars

System Information

Linux distribution

Ubuntu 24.04.

Terraform version

1.9.8

Provider and libvirt versions

0.8.1

If that gives you "was not built correctly", get the Git commit hash from your local provider repository:

git describe --always --abbrev=40 --dirty

Checklist

  • [x] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?

    • [x] Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.
    • [ ] If it is a very special case, consider using the XSLT support in the provider to tweak the definition instead of opening an issue
    • [ ] Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation
  • [ ] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:

Description of Issue/Question

Hi I would like to use cpu topology configuration and I think this will be useful for everybody but for my use case I was facing an issue with Rocky Linux getting freeze at boot, adding host-model to cpu mode did the trick, actually. But I noticed that neither this or option to insert xml is not available.

obviously this have the lowest priority possible.

Setup

(Please provide the full main.tf file for reproducing the issue (Be sure to remove sensitive information)

# instances.tf

resource "libvirt_domain" "admin" {
  name   = var.admin_hostname
  memory = var.admin_memory
  vcpu   = var.admin_vcpu

  disk {
    volume_id = libvirt_volume.admin_disk.id
  }

  network_interface {
    network_name   = var.network_name
    wait_for_lease = var.admin_use_dhcp
    addresses      = var.admin_use_dhcp ? [] : [var.admin_ip]
  }

  cloudinit = libvirt_cloudinit_disk.admin_cloudinit.id

  cpu {
    mode = "custom"  # If 'model' is supported, you can add it
    model = "kvm64"  # this is not supported
  }
}

Steps to Reproduce Issue

just try to use the options metioned above under cpu block of your domain configuration.


Additional information:

Do you have SELinux or Apparmor/Firewall enabled? Some special configuration? no Have you tried to reproduce the issue without them enabled? no

tiagovdaa avatar Oct 23 '24 19:10 tiagovdaa

I thin this is duplicate of #1020

scabala avatar Oct 23 '24 19:10 scabala

@scabala yes, it's related, there are also a feature request from 2019 that's also related. thanks for pointing this out.

tiagovdaa avatar Oct 23 '24 20:10 tiagovdaa

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

This issue report 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 bugs for the legacy provider, and to ask to check if the bug would apply to the new one. This also to encourage trying the new version.

  • https://registry.terraform.io/providers/dmacvicar/libvirt/latest

and check the documentation:

  • https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/README.md
  • https://registry.terraform.io/providers/dmacvicar/libvirt/latest/docs

You are free to reopen the bug for v0.8. It may encourage someone to fix it. My efforts will go into the new provider.

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

dmacvicar avatar Nov 08 '25 02:11 dmacvicar