Open Sashwat-K opened 2 weeks ago
@dmacvicar , please help here
I think this issue is related to libvirt directly more than to this provider. I would advise to try to reproduce this error using virt-install
. If you are able to do so, that's libvirt bug, not terraform-provider-libvirt
one.
Hello @scabala ,
I used virt-install and I am able to bring up an instance.
I used debug mode to see what is in the XML config generated by the provider. I can see it is defining <acpi>
.
<domain type="kvm">
<name>sashwatk_onprem_crypto_passthrough-domain</name>
<memory unit="MiB">8192</memory>
<vcpu>2</vcpu>
<os>
<type machine="s390-ccw-virtio">hvm</type>
</os>
<features>
<pae></pae>
<acpi></acpi>
<apic></apic>
</features>
<cpu></cpu>
<devices>
<disk type="volume" device="disk">
<driver name="qemu" type="qcow2"></driver>
<source pool="sashwatk_onprem_cryptopassthrough_pool" volume="sashwatk_onprem_crypto_passthrough-vda"></source>
<target dev="vda" bus="virtio"></target>
</disk>
<disk type="volume" device="disk">
<driver name="qemu" type="raw"></driver>
<source pool="sashwatk_onprem_cryptopassthrough_pool" volume="sashwatk_onprem_crypto_passthrough-vdc"></source>
<target dev="vdb" bus="virtio"></target>
</disk>
<interface type="network">
<mac address="52:54:00:02:b6:df"></mac>
<source network="default"></source>
<model type="virtio"></model>
</interface>
<console>
<target type="sclp" port="0"></target>
</console>
<channel type="unix">
<target type="virtio" name="org.qemu.guest_agent.0"></target>
</channel>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
</rng>
</devices>
</domain>
Would you guide me where should I raise the issue?
Thank you for the response.
In that case I think this might be provider issue. Could you share the domain_update.xsl
file?
Hello @scabala , The following the xsl file contents.
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices/disk/driver">
<xsl:copy>
<xsl:attribute name="iommu">on</xsl:attribute>
<xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<memballoon model="none"/>
</xsl:copy>
</xsl:template>
<xsl:variable name="i" select="position()" />
<xsl:template match="/domain/devices/interface">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<driver name="vhost" iommu="on"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/domain/devices/controller[@type='virtio-serial']"/>
<xsl:template match="/domain/devices/channel"/>
<xsl:template match="/domain/devices/audio"/>
<xsl:template match="/domain/devices/rng"/>
</xsl:stylesheet>
Hello @scabala , Did you get a chance to take a look into this issue?
Hi, I think this is caused by provider adding fields to VM definition but I haven't checked it - from you provided it looks like xsl file does not mess with ACPI so that's the only logical conclusion.
Hello @dmacvicar , Could you please help here?
System Information
Linux distribution
Ubuntu 24.04
Terraform version
Provider and libvirt versions
Description of Issue/Question
Setup
Steps to Reproduce Issue
Error
Additional information:
This terraform script is working on Ubuntu 22.04 and RHEL 8.4. But, not working in Ubuntu 24.04
I tried manually creating using
virsh define
andvirt-install
and it is working.