diff --git a/multiple/shared_modules/domain.tf b/multiple/shared_modules/domain.tf index e6006db..452a48b 100644 --- a/multiple/shared_modules/domain.tf +++ b/multiple/shared_modules/domain.tf @@ -3,6 +3,17 @@ resource "libvirt_domain" "domain" { name = "${var.vm_name}-${count.index}" memory = var.memory vcpu = var.vcpu + machine = "q35" + + # The chipset q35, which does not support the IDE bus, does not work with the terraform-provider-libvirt cloud-init implementation, + # which creates an ISO attached to an IDE bus by default. Workaround is implemented + # https://github.com/dmacvicar/terraform-provider-libvirt/issues/1137#issuecomment-2592329846 + # A cleaner solution might be the following : + # https://github.com/dmacvicar/terraform-provider-libvirt/pull/895#issuecomment-1911167872 + + xml { + xslt = file("${path.module}/q35-workaround.xslt") + } # Only include cloudinit if enabled cloudinit = var.enable_cloudinit ? libvirt_cloudinit_disk.commoninit[count.index].id : null diff --git a/multiple/shared_modules/q35-workaround.xslt b/multiple/shared_modules/q35-workaround.xslt new file mode 100644 index 0000000..ab132fa --- /dev/null +++ b/multiple/shared_modules/q35-workaround.xslt @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +