Learn how to resolve OpenSSH startup delays on virtual machines by feeding entropy from the host system using VirtIO RNG or other methods. Improve VM performance easily!
OpenSSHd
due to insufficient entropy. This is particularly noticeable during boot when services block while waiting for entropy from /dev/[u]random
or getrandom()
(in newer Linux releases). The lack of entropy results in delays, potentially extending boot time by up to a minute.
/dev/urandom
, to the guest. This method ensures a consistent supply of entropy without overloading the host system.
/dev/urandom
) from the host.
virtio-rng-pci: Passes the entropy source to the guest using the VirtIO interface.
max-bytes and period: Apply rate-limiting to prevent excessive CPU consumption by the entropy provider.
Ensure Compatibility
Guest systems with Linux kernels as old as version 2.6.32
can automatically use the VirtIO entropy source after a reboot. For older kernels or other OS types, ensure the VirtIO RNG driver is supported and enabled.
For older kernels or other OS types, ensure the VirtIO RNG driver is supported and enabled.
/dev/urandom
meets your requirements.
haveged
, you can significantly reduce startup delays for services on your guest VM and improve overall system performance.