Random Numbers in Virtual Machines
rhelblog.redhat.com
Random Numbers in Virtual Machines
1–10 of 18 posts
Re: Random Numbers in Virtual Machines
#2Anyone know what relationship that product has with oVirt ( http://www.ovirt.org ) ? I thought oVirt was kind of the upstream. So wouldn't they be adding this to oVirt as well.
Re: Random Numbers in Virtual Machines
#3> Red Hat Enterprise Virtualization starting version 3.5 also has exposed this feature. Anyone know what relationship that product has with oVirt ( http://www.ovirt.org ) ? I thought oVirt was kind of the upstream. So wouldn't they be adding this to oVirt as well.
Re: Random Numbers in Virtual Machines
#4I've been forced to use rng-tools and / or rng-usleep to get enough randomness in some Ubuntu VMs in the past. It's maddening to see SSL slowdowns for no good reason, and to have to trace it back to a blocking call to /dev/random for 8 lousy bytes.
Re: Random Numbers in Virtual Machines
#5> Red Hat Enterprise Virtualization starting version 3.5 also has exposed this feature. Anyone know what relationship that product has with oVirt ( http://www.ovirt.org ) ? I thought oVirt was kind of the upstream. So wouldn't they be adding this to oVirt as well.
Interesting fact: The original product was written in C# and ran only on Windows. It was translated into Java, largely automatically at first with manual tidy ups, so it could run on Linux or Windows servers. (Well there are some Python and other bits too)
http://lpeer.blogspot.co.uk/2010/04/switching-from-c-to-java...
http://lpeer.blogspot.co.uk/2010/05/casing-moving-target.htm...
Re: Random Numbers in Virtual Machines
#6Re: Random Numbers in Virtual Machines
#7Re: Random Numbers in Virtual Machines
#8It seems hwrng is mandatory otherwise /dev/random will block easily for virtio-rng.
Re: Random Numbers in Virtual Machines
#9It seems hwrng is mandatory otherwise /dev/random will block easily for virtio-rng.
Keep in mind, though, that just accessing /dev/urandom in the guest won't need too much input from the host.
However, having a hwrng is obviously the preferred option where there is need for a lot of entropy.
Re: Random Numbers in Virtual Machines
#10It seems hwrng is mandatory otherwise /dev/random will block easily for virtio-rng.
Modern Intel processors have an RDRAND instruction which (cue conspiracy theorists) is a hardware RNG. https://en.wikipedia.org/wiki/RdRand
https://software.intel.com/en-us/blogs/2012/11/17/the-differ...
Edit to add: we can obviously pass on the RDRAND instruction directly to the VM, but that's less portable, because not all servers in a server farm may have that instruction available, limiting live migration capabilities.
So we can just pass on output from RDSEED into the host's /dev/random, and feed the VM /dev/random by default as described.