Dustin Kirkland asked:
I’d like to pass the host’s
/dev/urandom device through to a qemu/kvm virtual machine.
Note that /dev/urandom is not seekable, so it’s not possible to pass it through as a block device using
I would expect that I should be able to pass it through as a serial device, but I can’t see to get that working. The guest needs to be able to read random data from some device in /dev where that random data is served by the host.
I am well aware of
virtio-rng in modern versions of qemu/kvm and that’s not quite what I’m looking for.
/dev/urandom you don’t need to do anything.
/dev/random KVM provides a paravirtualized random number generator to its (Linux) guests. This allows guests to use the host’s entropy pool. To use it, make sure that HW_RANDOM_VIRTIO is set in your guest kernel configuration.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.