If you’re curious about Linux but not enough to replace macOS or Windows with it, running it in a virtual machine is a great option. VirtualBox is one of the most popular VMs for a wide variety of reasons, one of which is that it’s free to use.
Virtual machines are complex things, and when something goes wrong, it can be tough to tell where the problem lies. This is especially true if you’re running Ubuntu and it’s constantly freezing. If this is happening to you, trying to figure out what the problem is can be an exercise in frustration.
Disable 3D Acceleration
No matter whether you’re running Windows, macOS, or even Linux, 3D acceleration can cause plenty of problems in VirtualBox. While it sounds like something you’d want, it rarely enables any actual gains in performance. If you’re encountering freezing, this is one of the first things to try turning off.
In the menu on the left in VirtualBox, right-click on the Ubuntu virtual machine you’re having problems with, then select Settings. Here, click the Display tab and make sure that “Enable 3D Acceleration” is not selected.
Change the Number of Virtual CPUs
Though computers sold to computers typically have only one physical CPU, they have multiple cores that act like multiple CPUs. Even so, VirtualBox, by default, will only expose one virtual CPU, which has been shown to cause problems with Ubuntu, especially recent versions.
If you’re encountering freezing, you may want to bump the number of CPUs up anywhere from two to four. Right-click on your virtual machine, select Settings, then go to the System tab. Here, select processor at the top of the section, and raise the slider until the number of CPUs is at least two.
Other Options to Try
There are some other options that different users have found solved their problems with freezing. In the same section where you can change the number of CPUs, there’s an option to “Enable PAE/NX.” Toggling this off if it’s on already, or on if it’s already off, could solve your problem.
You can also try changing your paravirtualization settings. Go to Settings, then select System and Acceleration below it. Paravirtualization Interface will likely be set to “Default,” but some users have had better results setting it to “Minimal.”
Try a Different Version of VirtualBox
No program is free of bugs, and this goes for both Ubuntu and VirtualBox. Some users have found that different versions of VirtualBox and Ubuntu sometimes just don’t get along. If a certain version of Ubuntu never froze in the past, you can try installing an older version of VirtualBox.
Conversely, you might try running a newer version of Ubuntu. Not only will you maybe solve your freezing problem, but you’ll get new features as well.
Hopefully, one of the above options has solved your freezing problem with Ubuntu. If you’re still having trouble, don’t give up hope. Trying different combinations of the above options could prove to be the solution for you. Don’t let one bad experience turn you away from using either Linux or virtual machines.
This article covers running Ubuntu in a virtual machine, but what about the other way around? If that’s what you’re looking to do, see our guide to installing and running VirtualBox on Ubuntu.