I installed Ubuntu 18.04 LTS in VirtualBox using the default virtual machine settings. However, Ubuntu 18.04 LTS hangs at the bootup screen and never reaches the login screen. Why is this the case and how can it be fixed?
I tried all the above hints and none of them worked for me. After 3 more hours I realized that the previous Docker installation enabled Hyper-V on my (Win10) machine which obviously did not do well with VirtualBox. So, another hint is to double-check that Hyper-V or other hypervisor is not already running and disable it if yes. Good luck troubleshooting.
The problem is that Ubuntu 18.04 LTS apparently doesn't like the 1GB RAM setting that is the default in VirtualBox. Although Ubuntu 18.04 LTS is advertised to work with 1GB RAM, in my case it didn't work.
Shut down the virtual machine and give it more memory, ideally at least 2GB. There is no need to reinstall Ubuntu 18.04 LTS. Actually, installing it with the default 1GB RAM only is ideal, as larger RAM sizes lead to larger swap file sizes, and swapping inside VirtualBox isn't recommended as there would be two levels of swapping then (host and guest).
After restarting the virtual machine with more memory, it no longer hangs at the bootup screen.
At the same time the memory size is adjusted, it may make sense to give the virtual machine more CPUs. The default CPU count is 1, but most even low-end laptop CPUs today have 4 virtual CPU cores at least, and the better ones have 8.
I am running a VM with Ubuntu 18.04 on macOS. The guest has plenty of base memory (RAM) and multiple processors.
(This is a raw VM that I used directly over HW on a PC in a different location. Usually when there are OS updates that's where I handle them. I suspect on a previous update of the guest something was installed that messed the setup on the macOS+rawVM combo.)
My machine was working fine on the macOS VM until one day it stopped booting properly. It would get stuck just before the login screen, showing the purple background with Ubuntu written on the bottom.
This is what I did to fix it:
Restart VB application, and host. Didn't fix the issue.
Update VirtualBox from 6 to 6.08. Didn't fix the issue.
Disable 3D acceleration as suggested in other posts. Didn't fix the issue; so I re-enabled it. My video memory is already at 128 MB so I didn't change that.
Changed the graphics controller from VMSVGA to VBoxSVGA. This fixed the issue. It is now working again properly (and my 3D acceleration is still enabled).
Jirka's answer gave me the clue which helped me fix the problem. The Windows 10 Hyper V system needed to be disabled. These instructions helped me:
I needed to disable Hyper V then re-boot my machine.
This then allowed VirtualBox to start Ubuntu 18.03 to successfully boot and not hang at startup. This same problem occurred with Ubuntu 16.04.
I am running Windows 10 Pro. And I develop and work with Docker so Hyper-V is enabled. Its a prerequisite for docker.
Using VirtualBox, I started installing Ubuntu Server. And when it comes to the point of installing kernel(the exact point is here in the above video),
it would suddenly start the process again to go back to this point, where it will ask "Please choose your preferred language" on the welcome screen.
And this would repeat.
- Finally I found this ans. So I went to "Turn windows features on or off" and disabled Hyper-V and restarted the pc.
Now I tried again and Ubuntu Server installed successfully.
But docker would not run. It said
Required Windows feature(s) not enabled: Hyper-V. Docker Desktop will exit.
So need to enable Hyper-V again.
- Now I confirm that both docker as well as Ubuntu server as a virtual machine run together.
For me following 3 easy steps helped to resolve the issue. 1) Increasing Video Memory 2) Enabling 3D acceleration 3) Disabling updates while installation of ubuntu. For demo purpose watch this video --> https://youtu.be/uqhMprx9g_U