...
<devices>
<tpm model='tpm-tis'>
- <backend type='emulator' version='2.0'>
+ <backend type='emulator' version='2.0' debug='5'>
<encryption secret='6dd3e4a5-1d76-44ce-961f-f119f5aad935'/>
<active_pcr_banks>
<sha256/>
``emulator``
For this backend type the 'swtpm' TPM Emulator must be installed on the
host. Libvirt will automatically start an independent TPM emulator for
- each QEMU guest requesting access to it.
+ each QEMU guest requesting access to it. :since:`10.6.0`, the ``debug``
+ parameter can be used to enable logging in the emulator backend, and
+ accepts non-zero integer values.
``version``
The ``version`` attribute indicates the version of the TPM. This attribute
&def->data.emulator.version) < 0)
goto error;
+ if (virXMLPropUInt(backends[0], "debug", 10, VIR_XML_PROP_NONE,
+ &def->data.emulator.debug) < 0)
+ goto error;
+
if (!(def->data.emulator.source = virDomainChrSourceDefNew(xmlopt)))
goto error;
secretuuid = virXPathString("string(./backend/encryption/@secret)", ctxt);
}
if (def->data.emulator.persistent_state)
virBufferAddLit(&backendAttrBuf, " persistent_state='yes'");
+ if (def->data.emulator.debug != 0)
+ virBufferAsprintf(&backendAttrBuf, " debug='%u'",
+ def->data.emulator.debug);
if (def->data.emulator.hassecretuuid) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
virDomainChrSourceDef *source;
char *storagepath;
char *logfile;
+ unsigned int debug;
unsigned char secretuuid[VIR_UUID_BUFLEN];
bool hassecretuuid;
bool persistent_state;
<ref name="virYesNo"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="debug">
+ <ref name="uint8"/>
+ </attribute>
+ </optional>
</group>
<group>
<attribute name="type">
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<tpm model='tpm-tis'>
- <backend type='emulator' version='2.0'>
+ <backend type='emulator' version='2.0' debug='3'>
<encryption secret='b4a117f1-8af2-44a4-91b8-7f0d2d4d68a3'/>
<active_pcr_banks>
<sha256/>