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?
16 Answers
In Virtualbox, shut down the vm, then edit settings of the Ubuntu Virtual Machine, then go to Display. Move the "Video memory" slider all the way to the right. Then also tick Acceleration: Enable 3D Acceleration.
Start up you vm again. This is on Virtualbox V5.2.12
-
I already had ram increased, but these changes fixed the issue for me. Jun 15, 2018 at 17:29
-
1actually you should do opposite. disable 3d acceleration since vm box doesn't support hardware acceleration in gnome– deviantOct 22, 2018 at 20:04
-
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.
-
1
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.
-
2releases.ubuntu.com/18.04 tells that you need at least 1024MB RAM to install.– juhistApr 29, 2018 at 11:55
-
1
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).
-
1Changing the graphics controller worked for me too, and other fixes didn't. Jun 21, 2019 at 15:18
Jirka Horník answer helped me. In my case it was Ubuntu Server 18.04.4 LTS not the desktop and was following this video. The following details the problem as well as solution that I applied.
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:
https://ittutorials.net/microsoft/hyper-v/how-to-disable-the-hyper-v-feature-in-windows-10/
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.
-
same solution in my case -- not sure why i enabled hyper-v in the past, so it's a good idea to check this Jul 28, 2019 at 21:54
System -> Acceleration:
uncheck Enable Nested Paging
-
1Could you explain in more detail why you think this will solve the OP's problem? Please see How to Answer and take our tour to learn how to improve your answer.– BurgiNov 26, 2019 at 12:58
In my case, all of the other answers' solutions were already applied, it still hanged. The problem turned out to be the VM's Paravirtualisation setting that was set to Legacy, changing it to Default solved the problem.
-
I tried increasing memory and video memory, and those might be necessary, but it boots fine only after I changed the Paravirtualization Provider to Default.– P. B.Oct 13, 2018 at 4:00
I'm running Ubuntu 18.04 in VirtualBox 6.0.10 on Windows 10 PC. Starting Ubuntu no longer gave me a login prompt, just a blank screen. I increased video memory from 16 MB to 64 MB, now everything runs fine again.
-
2Increasing video memory has already been suggested. Aug 1, 2019 at 23:52
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
I encountered this system hang using Ubuntu 18.04 LTS on VirtualBox 6.1.8 after rebooting from a software update. I fixed the problem by moving the video memory slider from the far right to halfway (64 mb) and disabling 3d acceleration.
The guest may also hang if the incorrect architecture is selected under Settings -> General -> Version (e.g. running a 64-bit OS with Version set to 32-bit).
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:
System
Processor
- Processor -> 1 CPU
- Enable PAE/NX -> Check
Acceleration
- Paravirtualization Interface -> Default
- Enable Nested Paging -> Check
Display
Screen
- 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
Windows Features
- Virtual Machine Platform -> Check
- Windows Hypervisor Platform -> Check
p/s: huge credits to all the answers in this thread~
notes:
- 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
important:
- do not
move / resize / maximize / minimize / alt tab
the 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.