Jump to: navigation, search

Difference between revisions of "LibvirtVirtioRng"

(Libvirt: Random number generator device support in Nova)
(Random number generator device)
Line 1: Line 1:
 
= Random number generator device =
 
= Random number generator device =
Virtio RNG id a paravirtual random number generator device, allows the host to inject entropy into guests, to fill its entropy pool.  /dev/random will be used as a default entropy source on the host, however, a physical HW RNG device could be configured as well.  
+
Virtio RNG is a paravirtual random number generator device, allows the host to inject entropy into guests, to fill its entropy pool.  /dev/random will be used as a default entropy source on the host, however, a physical HW RNG device could be configured as well.  
  
 
== Flavour configuration ==
 
== Flavour configuration ==
 
To prevent a single guest from exhausting the host's entropy supply, administrators will have the ability to limit and/or disable the use of this device, using the flavours extra_spects fields.
 
To prevent a single guest from exhausting the host's entropy supply, administrators will have the ability to limit and/or disable the use of this device, using the flavours extra_spects fields.
rng_enabled=True
+
:rng_enabled=True
rng_rate_bytes - The allowed amount of bytes for the the guest to read from the host’s entropy
+
:rng_rate_bytes - The allowed amount of bytes for the the guest to read from the host’s entropy
rng_rate_period - Sets the duration of a read period.  
+
:rng_rate_period - Sets the duration of a read period.  
  
 
== Image properties ==
 
== Image properties ==
Line 22: Line 22:
 
== Host configuration ==
 
== Host configuration ==
 
HW RNG device could be configured via the nova.conf to override the default use of /dev/random, if the device is present on the host:
 
HW RNG device could be configured via the nova.conf to override the default use of /dev/random, if the device is present on the host:
libvirt_eng_device=/dev/hwrng
+
:libvirt_eng_device=/dev/hwrng

Revision as of 22:08, 20 January 2014

Random number generator device

Virtio RNG is a paravirtual random number generator device, allows the host to inject entropy into guests, to fill its entropy pool. /dev/random will be used as a default entropy source on the host, however, a physical HW RNG device could be configured as well.

Flavour configuration

To prevent a single guest from exhausting the host's entropy supply, administrators will have the ability to limit and/or disable the use of this device, using the flavours extra_spects fields.

rng_enabled=True
rng_rate_bytes - The allowed amount of bytes for the the guest to read from the host’s entropy
rng_rate_period - Sets the duration of a read period.

Image properties

A request to enable the Virtio RNG device will be provided as an image metadata property. This is to allow for other hypervisors having their own choice of rng models. However, this request will be ignored in case the flavour disables the use of this device:


# glance image-update \
         --property hw_rng=virtio \
         [image]

Host configuration

HW RNG device could be configured via the nova.conf to override the default use of /dev/random, if the device is present on the host:

libvirt_eng_device=/dev/hwrng