diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 1828e0795b..623ef28719 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5676,6 +5676,7 @@ + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cde19a8a52..c38102a510 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9349,6 +9349,8 @@ virDomainDiskDefMirrorParse(virDomainDiskDefPtr def, if (virDomainStorageSourceParse(mirrorNode, ctxt, def->mirror, flags, xmlopt) < 0) return -1; + if (virDomainDiskBackingStoreParse(ctxt, def->mirror, flags, xmlopt) < 0) + return -1; } else { /* For back-compat reasons, we handle a file name encoded as * attributes, even though we prefer modern output in the style of @@ -24031,6 +24033,9 @@ virDomainDiskDefFormatMirror(virBufferPtr buf, if (virDomainDiskSourceFormat(&childBuf, disk->mirror, 0, false, flags, xmlopt) < 0) return -1; + if (virDomainDiskBackingStoreFormat(&childBuf, disk->mirror, xmlopt, flags) < 0) + return -1; + if (virXMLFormatElement(buf, "mirror", &attrBuf, &childBuf) < 0) return -1; diff --git a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml b/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml index 32bde1ba66..df23ac00aa 100644 --- a/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-mirror-in.xml @@ -65,6 +65,7 @@ +
@@ -76,6 +77,18 @@ + + + + + + + + + + + +
diff --git a/tests/qemuxml2argvdata/disk-mirror.xml b/tests/qemuxml2argvdata/disk-mirror.xml index e89eee47ed..c1e6e94e33 100644 --- a/tests/qemuxml2argvdata/disk-mirror.xml +++ b/tests/qemuxml2argvdata/disk-mirror.xml @@ -36,6 +36,7 @@ + @@ -45,6 +46,11 @@ + + + + + diff --git a/tests/qemuxml2xmloutdata/disk-mirror-active.xml b/tests/qemuxml2xmloutdata/disk-mirror-active.xml index d689eac6b8..32ffc647be 100644 --- a/tests/qemuxml2xmloutdata/disk-mirror-active.xml +++ b/tests/qemuxml2xmloutdata/disk-mirror-active.xml @@ -40,6 +40,7 @@ +
@@ -51,6 +52,11 @@ + + + + +