dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.6k stars 459 forks source link

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

Open tiagovdaa opened 1 month ago

tiagovdaa commented 1 month ago

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

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

scabala commented 1 month ago

I thin this is duplicate of #1020

tiagovdaa commented 1 month ago

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