Up until a few commits ago, libvirt produced this XML and so we need to be able to read it back to prevent a bunch of error : virXMLPropEnumInternal:516 : XML error: Invalid value for attribute 'value' in element 'allowReboot': 'default' messages from being logged on daemon upgrade when there are running guests. Fixes: 0fe2d8dd335054fae38b46bbbac58a4662e1a1d0 Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 5fe05cc09a..88d9499bd0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2859,9 +2859,12 @@ qemuDomainObjPrivateXMLParseAllowReboot(xmlXPathContextPtr ctxt, { xmlNodePtr node = virXPathNode("./allowReboot", ctxt); - return virXMLPropTristateBool(node, "value", - VIR_XML_PROP_NONE, - allowReboot); + /* Allow value='default' as the input here, because old versions + * of libvirt produced that output and we need to be able to read + * it back to correctly handle running guests on daemon upgrade */ + return virXMLPropTristateBoolAllowDefault(node, "value", + VIR_XML_PROP_NONE, + allowReboot); } -- 2.35.1