to be used for the domain. The source model is configured using the
<code>model</code> attribute. Supported source models are:
</p>
- <ul>
- <li>'random' — /dev/random (default) or /dev/hwrng
- device as source (for now, no other sources are permitted)</li>
- <li>'egd' — a EGD protocol backend</li>
- </ul>
- </dd>
- <dt><code>backend model='random'</code></dt>
- <dd>
- <p>
- This backend type expects a non-blocking character device as input.
- The only accepted paths are /dev/random and /dev/hwrng. The file
- name is specified as contents of the <code>backend</code> element.
- When no file name is specified the hypervisor default is used.
- </p>
- </dd>
- <dt><code>backend model='egd'</code></dt>
- <dd>
- <p>
- This backend connects to a source using the EGD protocol.
- The source is specified as a character device. Refer to
- <a href='#elementsCharHostInterface'>character device host interface</a>
- for more information.
- </p>
+ <dl>
+ <dt><code>random</code></dt>
+ <dd>
+ <p>
+ This backend type expects a non-blocking character device as
+ input. The file name is specified as contents of the
+ <code>backend</code> element. When no file name is specified
+ the hypervisor default is used. For qemu, the default is
+ /dev/random
+ </p>
+ </dd>
+ <dt><code>egd</code></dt>
+ <dd>
+ <p>
+ This backend connects to a source using the EGD protocol.
+ The source is specified as a character device. Refer to
+ <a href='#elementsCharHostInterface'>character device host interface</a>
+ for more information.
+ </p>
+ </dd>
+ </dl>
</dd>
-
</dl>
<h4><a name="elementsTpm">TPM device</a></h4>
switch ((virDomainRNGBackend) def->backend) {
case VIR_DOMAIN_RNG_BACKEND_RANDOM:
def->source.file = virXPathString("string(./backend)", ctxt);
- if (def->source.file &&
- STRNEQ(def->source.file, "/dev/random") &&
- STRNEQ(def->source.file, "/dev/hwrng")) {
- virReportError(VIR_ERR_XML_ERROR,
- _("file '%s' is not a supported random source"),
- def->source.file);
- goto error;
- }
break;
case VIR_DOMAIN_RNG_BACKEND_EGD:
-boot c \
-usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object rng-random,id=objrng0,filename=/dev/hwrng \
+-object rng-random,id=objrng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.0,\
addr=0x4