Ubuntu 18.04 lts freezes while in boot, in wndows Virtual box. Solution?

117,554

Solution 1

In the VirtualBox machine settings, simply turn off the "3D acceleration".

Solution 2

i've had the same issue:

  • 3D acceleration = off
  • 10 GB Ram

My solution was:

  • 1 processor => 4 processors
  • enable PAE/NX

Solution 3

Several of my old VMs seem to hang on bootup. If in Grub I select "recovery mode", the last messages displayed on the screen are:

smp: Bringing up secondary CPUs...
x86: Booting SMP configuration:

Then it hangs.

In my case, I can confirm that for all my VMs experiencing this problem, changing the Virtualbox setting "System -> Acceleration -> Paravirtualization Interface" from "Legacy" to "Default" enabled these old VMs to work again. Switching it back to "Legacy" immediately makes it hang on boot, so I know for certain this is the key to the issue in my case.

Solution 4

Did you allocate enough RAM to the virtual machine? Give it 2GB or more RAM. I discovered when I ran Ubuntu 18.04 live cd on virtual box, it froze at some point, but on allocation of more RAM, I got it working perfectly

Solution 5

For me, I had to disable hyper-v before I could get it to work. Increasing the other options listed in this answer didn't help. This can be done by searching for "Turn windows features on or off" in Windows, then un-checking Hyper-V (you need to restart your computer after).

Share:
117,554

Related videos on Youtube

Battleseeker_Rex
Author by

Battleseeker_Rex

Updated on September 18, 2022

Comments

  • Battleseeker_Rex
    Battleseeker_Rex over 1 year

    I am Using Ubuntu in Virtual Box.. the Host OS is Windows10 with dedicated intel's Graphics.

    I have reinstalled twice, probably this starts due to sudden shutdown or some reason. Dnt know whats the problem.

    Saw a old post about this type on Ubuntu 12.04 / 14.04 LTS ... but their problem/ solution was on Nvidia Driver. And following that didnt help me! . Any solution ?

    • Battleseeker_Rex
      Battleseeker_Rex about 6 years
      One more thing, i have the 18.04 live server one for a while .... this happens with it too...... but reason dnt know
    • RuntimeException
      RuntimeException almost 6 years
      Same here. Virtualbox 5.2. Ubuntu 18.04. Windows 10 Host with Intel graphics. Reinstalled thrice. Fails on bootup. No error, it simply waits with a purple screen and 5 dots. No guest additions, it is a fresh install. Trying to login the first time after reboot. Based on the answers, it seems there is no single reason.
    • David LeBauer
      David LeBauer almost 4 years
      I gather that currently (windows 10 v 2004 Virtualbox 6.1) VirtualBox doesn't work alongside WSL2 b/c of the bugs in VBox support for Hyper-V. stackoverflow.com/questions/62184881/virtualbox-and-wsl2 see also docs.microsoft.com/en-us/windows/wsl/…
    • FrankIJ
      FrankIJ over 3 years
      It is also possible that a windows update changed some settings. Verify hyper-v is disabled and sandbox as well (found in the features part of windows)
    • cavila
      cavila almost 3 years
      I downloaded the xubuntu torrent and also on same problem. The guest Xubuntu hangs during the boot. Virtualbox 6.1.16 r140961 (Qt5.6.2).
  • Battleseeker_Rex
    Battleseeker_Rex about 6 years
    i gave it 4 GB ram .... and 2 core to process from the start .... Turning off the 3d acceleration ... the problem is not repeating now !!!
  • Battleseeker_Rex
    Battleseeker_Rex about 6 years
    Thanks for the tip Though !!
  • Chris Chubb
    Chris Chubb about 6 years
    I already had 3D acceleration turned off, but I did increase the video memory from 16 to 64 Mb and that got it to work for me.
  • Battleseeker_Rex
    Battleseeker_Rex almost 6 years
    i have kept my Vid memory full -_- @Chris Chubb
  • James Chen
    James Chen almost 6 years
    I also had to increase the number of processors (I set it to 2). Enabling PAE/NX was not necessary for me.
  • John McCann
    John McCann almost 6 years
    Same findings as @Ignitor
  • HDave
    HDave almost 6 years
    It was already off for me. Adding a second cpu per bressers answer did the trick.
  • Blackraspberryyy
    Blackraspberryyy almost 6 years
    @Ignitor worked for me too.. i.e. 2 seemed to suffice
  • MichaelICE
    MichaelICE almost 6 years
    Adding +1 CPU worked for me.
  • Blackraspberryyy
    Blackraspberryyy almost 6 years
    scratch that - still not working for me, well it seems to not freeze randomly once in a blue moon
  • RuntimeException
    RuntimeException almost 6 years
    pae/nx is disabled by default when creating a VM. It is required for 32 bit OS IIRC. Number of CPU should not have any effect. @bph - I find it random as well.
  • abu_bua
    abu_bua almost 6 years
    Hi Runtime! Can you explain why disabling the Solid-state Drive ? It's common that the 3d-acceleration can cause freezing.
  • RuntimeException
    RuntimeException almost 6 years
    Select your VM in manager > Settings > Storage > Select your VDI under SATA > Uncheck the Solid-state Drive box. It is disabled by default. I have an SSD so I had enabled it. Apparently, it is for the guest to see it as an SSD. Seems like there is a bug in Virtualbox 5.2.14 and/or Ubuntu 18.04 where it cannot handle SSD properly.
  • AleksandrH
    AleksandrH almost 6 years
    Increasing RAM to 4 GB instead of 1 GB and the number of CPUs did the trick for me.
  • Blackraspberryyy
    Blackraspberryyy almost 6 years
    mine is a 64 bit guest (linux) on 64 bit host (win10) and pae/nx is disabled by default for me. I've left it that way. What has fixed my problem (for now) is taking the steps detailed here but also running VB as Admin prior to installing the VM.
  • Unknow0059
    Unknow0059 over 4 years
    This worked for me.
  • Narendran Solai Sridharan
    Narendran Solai Sridharan over 4 years
    Adding video memory and making it 128 MB helped to fix my screen issue
  • VivekDev
    VivekDev about 4 years
    I was installing Ubuntu Server and your answer helped. A detailed ans is here.
  • Abdelrahman Shoman
    Abdelrahman Shoman almost 4 years
    Same finding as @Ignitor