VIR_TRISTATE_BOOL_ABSENT which maps to the 'default' string would not be parsed back, so we shouldn't format it either. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/domain_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f1e4d33a8d..f6a225e4e6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24662,8 +24662,9 @@ virDomainDiskSourceNVMeFormat(virBufferPtr attrBuf, const virStorageSourceNVMeDef *nvme) { virBufferAddLit(attrBuf, " type='pci'"); - virBufferAsprintf(attrBuf, " managed='%s'", - virTristateBoolTypeToString(nvme->managed)); + if (nvme->managed != VIR_TRISTATE_BOOL_ABSENT) + virBufferAsprintf(attrBuf, " managed='%s'", + virTristateBoolTypeToString(nvme->managed)); virBufferAsprintf(attrBuf, " namespace='%llu'", nvme->namespc); virPCIDeviceAddressFormat(childBuf, nvme->pciAddr, false); } -- 2.24.1