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).
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.
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.
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
If nothing that has been mentioned helps, please try to do the next:
Get to the "Windows Features" -> Click the Start button -> Click Control Panel -> Click Programs -> Click Turn Windows features on or off.
Then set the following:
- Disabled -> Hyper-V
- Enabled -> Virtual Machine Platform
- Enabled -> Windows Hypervisor Platform
- Disabled -> Windows Sandbox
Then, you should also do the following. Right-click the start button, and choose PowerShell (Admin) or Command Prompt (Admin) and run the following command:
bcdedit /set hypervisorlaunchtype off
Reboot your machine, and try launching the VM again.
Given the large number of different answers, my only contribution is that if you jump to/from full screen (HostKey + F) while the VM boot is halted and the boot continues; you potentially have a problem with the display settings and one or more of the answers talking about 3D settings, Video memory, etc... may be your best bet for solving your particular problem.
In my case, this combination is what worked for me:
- Processor -> 1 CPU
- Enable PAE/NX -> Check
- Paravirtualization Interface -> Default
- Enable Nested Paging -> Check
- Video Memory -> 128MB
- 3D Acceleration -> Check
- Graphics Controller -> VMSVGA
(some tutorials will suggest choosing VBoxSVGA to change resolution)
In my case, VBoxSVGA didn't work & you can always change the resolution in the guest machine's Display Settings anyways
- Virtual Machine Platform -> Check
- Windows Hypervisor Platform -> Check
p/s: huge credits to all the answers in this thread~
- got it working through trial & error
- each time you enable / disable / change a setting, be sure to relaunch the guest machine to identify which setting is causing the issue
- do not
move / resize / maximize / minimize / alt tabthe guest machine's window when booting - it will fail to boot an otherwise working version
I tried everything on this page; various combinations; finally working. Who knows what does it. Good luck my friends.
Can't say good things about a software that can't tell you how it's failing or suggest how to fix it. Or, when there are a dozen possible ways to fix it yet no one knows for sure which one it is.