<code>model</code> attribute. Supported source models are:
</p>
<ul>
- <li>'random' — /dev/random (default) or similar device as source</li>
+ <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>
<attribute name="model">
<value>random</value>
</attribute>
- <ref name="filePath"/>
+ <choice>
+ <value>/dev/random</value>
+ <value>/dev/hwrng</value>
+ </choice>
</group>
<group>
<attribute name="model">
switch ((enum virDomainRNGBackend) def->backend) {
case VIR_DOMAIN_RNG_BACKEND_RANDOM:
def->source.file = virXPathString("string(./backend)", ctxt);
+ if (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:
-S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
--object 'rng-random,id=rng0,filename=/test/ph<ile' \
+-object rng-random,id=rng0,filename=/dev/hwrng \
-device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4
<controller type='usb' index='0'/>
<memballoon model='virtio'/>
<rng model='virtio'>
- <backend model='random'>/test/ph<ile</backend>
+ <backend model='random'>/dev/hwrng</backend>
</rng>
</devices>
</domain>