Ubuntu 18.04 LTS installed in VirtualBox hang at boot up after system update

I followed the advice given at this thread forums.virtualbox.org

  1. Create a new machine by, for example, clicking new in the UI
  2. Choose advanced mode
  3. Select the .vdi file from the non-working machine with Ubuntu
  4. Keep this machine's settings simple
  5. Boot up and things should work normally

My setup is very similar to yours, so we might have the same issue. In my case, the boot times of the updated Ubuntu VM were just dramatically increased (5min vs. 20 sec).

To verify:

  • Let the VM boot up process finish
  • In the Ubuntu session open the terminal and run journalctl -b
  • There should be a long delay stated at the stage kernel: random: crng init done

To solve:

  • Start the updated Ubuntu VM
  • Click inside the starting VM display and make sure your input is captured. Pressing any key within the VM will significantly speed up the boot up process.
  • In the Ubuntu session open the terminal and update the rng-tools5 package: sudo apt upgrade rng-tools5
  • After rebooting the boot up times should back to normal again.

Looks like the VirtualBox installations of 18.04 LTS with the current patch level suffer from the same bug like some bare-metal installation without a hardware random number generator.

The information to update the rng-tools5 package was found here: https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done