We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A quick and portable way to transmit information such as strings to guest is using SMBIOS tables.
Can be implemented in a simple way by using a list that would fill the OEM section: smbios = ['string1', 'string2'] which would be converted to:
smbios = ['string1', 'string2']
<sysinfo type="smbios"> <oemStrings> <entry>string1</entry> <entry>string2</entry> </oemStrings> </sysinfo>
Or by using a mix of dict/list: smbios = {'system':{'manufacturer':'Fedora'}} Which would be converted to:
smbios = {'system':{'manufacturer':'Fedora'}}
<system> <entry name='manufacturer'>Fedora</entry> </system>
The text was updated successfully, but these errors were encountered:
Quick work-around to set OEM strings from list:
Terraform part:
xml { xslt = templatefile("${path.module}/smbios.xsl.tftpl", {"oemstrings": ["hello", "world"]}) }
XSLT/template smbios.xsl.tftpl part:
smbios.xsl.tftpl
<?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/os"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> <xsl:element name ="smbios"> <xsl:attribute name="mode">sysinfo</xsl:attribute> </xsl:element> </xsl:copy> </xsl:template> <xsl:template match="/domain"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> <xsl:element name ="sysinfo"> <xsl:attribute name="type">smbios</xsl:attribute> <xsl:element name="oemStrings"> %{ for oemstring in oemstrings ~} <xsl:element name="entry">${oemstring}</xsl:element> %{ endfor ~} </xsl:element> </xsl:element> </xsl:copy> </xsl:template> </xsl:stylesheet>
Sorry, something went wrong.
No branches or pull requests
A quick and portable way to transmit information such as strings to guest is using SMBIOS tables.
Can be implemented in a simple way by using a list that would fill the OEM section:
smbios = ['string1', 'string2']
which would be converted to:
Or by using a mix of dict/list:
smbios = {'system':{'manufacturer':'Fedora'}}
Which would be converted to:
The text was updated successfully, but these errors were encountered: