Enhanced entropy availability in containers / RNGd

Loredo

Renowned Member
Feb 21, 2012
27
0
66
Munich
Hi,

I would need better random numbers available in one container as it is too low to setup needed software:

Code:
cat /proc/sys/kernel/random/entropy_avail
138

I installed rngd daemon on the host to improve entropy availability which basically works for the host itself (I know using urandom is not a totally good idea but I don't have a chance to get a hardware dongle attached to my server).

However effect on container seems to be minimal. I also tried to run rngd directly inside of the container but wasn't able to give write access to /dev/random device from inside the container - and in the end the host system should be the correct place I guess.

Of course I could use a KVM machine instead, in fact I tried this and it worked with the help of rngd running inside the guest system.
But how should this be handled for virtual containers in general? I wasn't able to find anything useful via Google search but maybe here is somebody to contribute some thoughts.


Regards,
Julian
 
It seems I found a solution for this.

Installing haveged via "aptitude install haveged" seems to produce better entropy.
(http://www.issihosts.com/haveged/)

Although I don't have any longterm experience yet, maybe this is worth to be mentioned in the Wiki as a recommended extension for a Proxmox standard installation.


Regards,
Julian