QEMU/Devices/Virtio

VirtIO is a platform for IO virtualization, common to several hypervisors (and QEMU).

The guest operating system needs specialized drivers to handle these devices.

Entropy sources
To set up a VirtIO RNG, you first need to provide a source of entropy for it.

For devices exported by the kernel on UNIX-like systems, you can do so like this:

It is obviously not limited to the kernel RNG, you can choose a hardware RNG too in the very same way.

It also supports EGD, though it is not recommended because of its poor performance. Example:

Adding the actual device
Then you can add the actual device, like this:

There's also an option to limit the amount of data the guest received, to avoid starving the host. Example:  for 512 bytes/s.