diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 727ea33f144a598b1178ee121161807a13d30a03..0648703fd9b9b64e92a596d3591ce433888e64a1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1937,6 +1937,9 @@ static int qemuStorageSourcePrivateDataParse(xmlXPathContextPtr ctxt, virStorageSourcePtr src) { + src->nodestorage = virXPathString("string(./nodenames/nodename[@type='storage']/@name)", ctxt); + src->nodeformat = virXPathString("string(./nodenames/nodename[@type='format']/@name)", ctxt); + if (virStorageSourcePrivateDataParseRelPath(ctxt, src) < 0) return -1; @@ -1948,6 +1951,15 @@ static int qemuStorageSourcePrivateDataFormat(virStorageSourcePtr src, virBufferPtr buf) { + if (src->nodestorage || src->nodeformat) { + virBufferAddLit(buf, "\n"); + virBufferAdjustIndent(buf, 2); + virBufferEscapeString(buf, "\n", src->nodestorage); + virBufferEscapeString(buf, "\n", src->nodeformat); + virBufferAdjustIndent(buf, -2); + virBufferAddLit(buf, "\n"); + } + if (virStorageSourcePrivateDataFormatRelPath(src, buf) < 0) return -1; diff --git a/tests/qemustatusxml2xmldata/modern-in.xml b/tests/qemustatusxml2xmldata/modern-in.xml index c1e57618b6973a916e9131814b32809843558ed3..d57e1f605f2fd553ba06784c2fe53c37b942fc24 100644 --- a/tests/qemustatusxml2xmldata/modern-in.xml +++ b/tests/qemustatusxml2xmldata/modern-in.xml @@ -309,6 +309,10 @@ + + + + base.qcow2