21

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?

12 Answers 12

15

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

| improve this answer | |
  • I already had ram increased, but these changes fixed the issue for me. – CorayThan Jun 15 '18 at 17:29
  • actually you should do opposite. disable 3d acceleration since vm box doesn't support hardware acceleration in gnome – deviant Oct 22 '18 at 20:04
  • This is working great. – Noam Shalev Jan 18 '19 at 20:42
7

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.

| improve this answer | |
  • 1
    None of the other fixed worked, this is what fixed it for me. – DMin Nov 14 '19 at 6:39
6

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.

| improve this answer | |
  • 2
    releases.ubuntu.com/18.04 tells that you need at least 1024MB RAM to install. – juhist Apr 29 '18 at 11:55
  • 1
    Mine has the same behaviour and I gave it 4 Gig RAM. – warhansen May 17 '18 at 13:15
5

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:

  1. Restart VB application, and host. Didn't fix the issue.

  2. Update VirtualBox from 6 to 6.08. Didn't fix the issue.

  3. 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.

  4. 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).

| improve this answer | |
  • 1
    Changing the graphics controller worked for me too, and other fixes didn't. – jotadepicas Jun 21 '19 at 15:18
1

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.

| improve this answer | |
  • same solution in my case -- not sure why i enabled hyper-v in the past, so it's a good idea to check this – Richard DiSalvo Jul 28 '19 at 21:54
1

System -> Acceleration:

uncheck Enable Nested Paging

| improve this answer | |
  • Could 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. – Burgi Nov 26 '19 at 12:58
1

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.

  1. I am running Windows 10 Pro. And I develop and work with Docker so Hyper-V is enabled. Its a prerequisite for docker.

  2. 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),

Installing Kernel on Ubuntu

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.

Choose your preferred language on Welcome screen on Ubuntu

And this would repeat.

  1. Finally I found this ans. So I went to "Turn windows features on or off" and disabled Hyper-V and restarted the pc.

Disabling Hyper-V on Windows 10 Pro

  1. Now I tried again and Ubuntu Server installed successfully.

  2. But docker would not run. It said

Required Windows feature(s) not enabled: Hyper-V. Docker Desktop will exit.

Docker error Without Hyper-V

So need to enable Hyper-V again.

Enabling Hyper-V on Windows 10 Pro

  1. Now I confirm that both docker as well as Ubuntu server as a virtual machine run together.
| improve this answer | |
0

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.

| improve this answer | |
  • 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. – Peng Bai Oct 13 '18 at 4:00
0

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.

| improve this answer | |
0

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

| improve this answer | |
0

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.

| improve this answer | |
0

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).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.