From: Peter Krempa Date: Thu, 20 Dec 2012 11:06:52 +0000 (+0100) Subject: doc: schema: Add basic documentation for the virtual RNG device support X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fa16c80f52136371dcc88649052fd9f7adff73eb;p=libvirt.git doc: schema: Add basic documentation for the virtual RNG device support This patch documents XML elements used for (basic) support of virtual RNG devices. In the devices section in the domain XML users may specify: For the default 'random' backend: /dev/urandom For the slightly more advanced EGD backend: For the planned random daemon/pool: class to enable the RNG device for guests. --- diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a9003d70d6..12c946858a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4279,6 +4279,75 @@ qemu-kvm -net nic,model=? /dev/null +

Random number generator device

+ +

+ The virtual random number generator device allows the host to pass + through entropy to guest operating systems. + Since 1.0.3 +

+ +

+ Example: usage of the RNG device: +

+
+  ...
+  <devices>
+    <rng model='virtio'>
+      <backend model='random'>/dev/random</backend>
+      <!-- OR -->
+      <backend model='egd' type='udp'>
+        <source mode='bind' service='1234'>
+        <source mode='connect' host='1.2.3.4' service='1234'>
+      </backend>
+    </rng>
+  </devices>
+  ...
+
+
+
model
+
+

+ The required model attribute specifies what type + of RNG device is provided. Valid values are specific to + the virtualization platform: +

+
    +
  • 'virtio' — supported by qemu and virtio-rng kernel module
  • +
+
+
backend
+
+

+ The backend element specifies the source of entropy + to be used for the domain. The source model is configured using the + model attribute. Supported source models are: +

+
    +
  • 'random' — /dev/random (default) or similar device as source
  • +
  • 'egd' — a EGD protocol backend
  • +
+
+
backend type='random'
+
+

+ This backend type expects a non-blocking character device as input. + Examples of such devices are /dev/random and /dev/urandom. The file + name is specified as contents of the backend element. + When no file name is specified the hypervisor default is used. +

+
+
backend type='egd'
+
+

+ This backend connects to a source using the EGD protocol. + The source is specified as a character device. Refer to + character device host interface + for more information. +

+
+ +

Security label

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 63be4aaebc..8330a507ff 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -3126,6 +3126,7 @@ + @@ -3514,6 +3515,37 @@ + + + + + virtio + + + + + + + + + + + + random + + + + + + egd + + + + + + + +