disk transient prevents the domain from participating in migration,
snapshots, or blockjobs. Only supported in vmx hypervisor
(:since:`Since 0.9.5`) and ``qemu`` hypervisor (:since:`Since 6.9.0`).
+
+ In cases where the source image of the ``<transient/>`` disk is supposed to
+ be shared between multiple concurrently running VMs the optional
+ ``shareBacking`` attribute should be set to ``yes``. Note that hypervisor
+ drivers may need to hotplug such disk and thus it works only with
+ configurations supporting hotplug. :since:`Since 7.4.0`
``serial``
If present, this specify serial number of virtual hard drive. For example, it
may look like ``<serial>WD-WMAP9A966149</serial>``. Not supported for
xmlNodePtr blockioNode;
xmlNodePtr driverNode;
xmlNodePtr mirrorNode;
+ xmlNodePtr transientNode;
g_autoptr(virStorageSource) src = NULL;
if (!(src = virDomainDiskDefParseSourceXML(xmlopt, node, ctxt, flags)))
}
}
- if (virXPathNode("./transient", ctxt))
+ if ((transientNode = virXPathNode("./transient", ctxt))) {
def->transient = true;
+ if (virXMLPropTristateBool(transientNode, "shareBacking",
+ VIR_XML_PROP_NONE,
+ &def->transientShareBacking) < 0)
+ return NULL;
+ }
+
if (virDomainDiskDefIotuneParse(def, ctxt) < 0)
return NULL;
virBufferAddLit(buf, "<readonly/>\n");
if (def->src->shared)
virBufferAddLit(buf, "<shareable/>\n");
- if (def->transient)
- virBufferAddLit(buf, "<transient/>\n");
+ if (def->transient) {
+ virBufferAddLit(buf, "<transient");
+ if (def->transientShareBacking == VIR_TRISTATE_BOOL_YES)
+ virBufferAddLit(buf, " shareBacking='yes'");
+ virBufferAddLit(buf, "/>\n");
+ }
virBufferEscapeString(buf, "<serial>%s</serial>\n", def->serial);
virBufferEscapeString(buf, "<wwn>%s</wwn>\n", def->wwn);
virBufferEscapeString(buf, "<vendor>%s</vendor>\n", def->vendor);
unsigned int snapshot; /* virDomainSnapshotLocation, snapshot_conf.h */
virDomainStartupPolicy startupPolicy;
bool transient;
+ virTristateBool transientShareBacking;
virDomainDeviceInfo info;
virTristateBool rawio;
virDomainDeviceSGIO sgio;