mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Add VM Generation ID parse/format support
The VM Generation ID is a mechanism to provide a unique 128-bit, cryptographically random, and integer value identifier known as the GUID (Globally Unique Identifier) to the guest OS. The value is used to help notify the guest operating system when the virtual machine is executed with a different configuration. This patch adds support for a new "genid" XML element similar to the "uuid" element. The "genid" element can have two forms "<genid/>" or "<genid>$GUID</genid>". If the $GUID is not provided, libvirt will generate one and save it in the XML. Since adding support for a generated GUID (or UUID like) value to be displayed modifying the xml2xml test to include virrandommock.so is necessary since it will generate a "known" value. Signed-off-by: John Ferlan <jferlan@redhat.com> ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
<domain type='kvm' id='1'>
|
||||
<name>MyGuest</name>
|
||||
<uuid>4dea22b3-1d52-d8f3-2516-782e98ab3fa0</uuid>
|
||||
<genid>43dc0cf8-809b-4adb-9bea-a9abb5f3d90e</genid>
|
||||
<title>A short description - title - of the domain</title>
|
||||
<description>Some human readable description</description>
|
||||
<metadata>
|
||||
@@ -61,6 +62,32 @@
|
||||
specification. <span class="since">Since 0.0.1, sysinfo
|
||||
since 0.8.7</span></dd>
|
||||
|
||||
<dt><code>genid</code></dt>
|
||||
<dd><span class="since">Since 4.4.0</span>, the <code>genid</code>
|
||||
element can be used to add a Virtual Machine Generation ID which
|
||||
exposes a 128-bit, cryptographically random, integer value identifier,
|
||||
referred to as a Globally Unique Identifier (GUID) using the same
|
||||
format as the <code>uuid</code>. The value is used to help notify
|
||||
the guest operating system when the virtual machine is re-executing
|
||||
something that has already executed before, such as:
|
||||
|
||||
<ul>
|
||||
<li>VM starts executing a snapshot</li>
|
||||
<li>VM is recovered from backup</li>
|
||||
<li>VM is failover in a disaster recovery environment</li>
|
||||
<li>VM is imported, copied, or cloned</li>
|
||||
</ul>
|
||||
|
||||
The guest operating system notices the change and is then able to
|
||||
react as appropriate by marking its copies of distributed databases
|
||||
as dirty, re-initializing its random number generator, etc.
|
||||
|
||||
<p>
|
||||
The libvirt XML parser will accept both a provided GUID value
|
||||
or just <genid/> in which case a GUID will be generated
|
||||
and saved in the XML. For the transitions such as above, libvirt
|
||||
will change the GUID before re-executing.</p></dd>
|
||||
|
||||
<dt><code>title</code></dt>
|
||||
<dd>The optional element <code>title</code> provides space for a
|
||||
short description of the domain. The title should not contain
|
||||
|
||||
Reference in New Issue
Block a user