canonical / canonical/multipass

boot time is slow because of lack of random entropy from host

Open
#709 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 2h
Merged PRs (30d)
43

Description

Most VM hosts can pass entropy to the VM and hence allow the kernel to get entropy really fast during the early kernel boot. For example kvm-qemu supports this feature. However, we don't seem to have this on the Windows multipass startups, causing long delays in boot:

For example, on xenial VMs on multipass for Windows we get a 3.47 second delay between the input init and the random pool init (from Xenial dmesg):

[ 7.280017] input: AT Translated Set 2 keyboard as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/d34b2567-b9b6-42b9-8778-0a4ec0b955bf/serio2/input/input5
[ 10.756222] random: nonblocking pool is initialized

And the same for Bionic too, we get an 8.34 second delay:

[ 7.058739] input: AT Translated Set 2 keyboard as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/d34b2567-b9b6-42b9-8778-0a4ec0b955bf/serio2/input/input5
[ 15.396069] random: crng init done

There probably is a way to do with the Windows hypervisor and such a fix would radically reduce boot times.

Contributor guide

Open the contributing guide

Research direction

Start with the Windows multipass startup path and the Windows hypervisor integration; compare them with the entropy-passing support described for KVM-QEMU. Verify any change against the Xenial and Bionic boot logs, checking whether the random pool initializes without the reported delays.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.