4

I installed VirtualBox on my new Mac mini, running macOS Mojave, and it randomly crashes the computer (sometimes it does, other times it doesn't).

The last time it crashed such that both my monitors (that are plugged into the Mac mini through USB-C to HDMI adapters) were not working. I spent close to 2 hours trying to figure out what happened. I was sure it was something internal, and not the USB-C ports, because I was able to open recovery (by pressing and holding Command + R during boot) and see what's being displayed, but I wouldn't see anything when I'd normally turn on my computer.

After 2 hours of trying different things, I plugged one of my screens into HDMI (instead of USB-C) and saw the password screen, logged in, and the USB-C ports started working again.

Can someone explain what is going on here? I started to think that this was the computer trolling me. I never had these problems on either Windows or Linux.

  • It doesn't, at least on my Mac. There it has worked fine for years.It is likely that something else installed on your Mac or other modification is causing this. But then VB is free and while it is generally well-behaved it is slower than paid alternatives. In other words it may not be compatible with your system as configured. You may need to visit the VB forums for more specific expertise. – Steve Chambers Jun 2 at 11:50
  • If you completely uninstall the software do the crashes go away? ( or do you know this software is causing the crash and you want to know how that mechanism or instability works?) – bmike Jun 2 at 12:10
  • @bmike, yes. The crashes happen only when I start one of my Linux virtual machines. I press "start" and my computer reboots. – hey_you Jun 2 at 12:40
  • @bmike I just want too find out why this happens. – hey_you Jun 2 at 12:42
  • 1
    @jksoegaard I don't even have a touch bar, how the heck did it crash? Lol. I have a mac mini. – hey_you Jun 2 at 16:18
5

This is commonly due to bugs in VirtualBox.

VirtualBox installs itself as a kernel extension directly into the lowest level of kernel software running on your Mac affecting stability of the system as a whole. This is why you need to enter an administrative user’s password in order to install VirtualBox.

To fix this, ensure that you have the latest software versions of VirtualBox, add-on packs and macOS installed. Double-check your virtual machine configuration for configuration errors (especially if you’re using PCIe pass-through or similar).

If this doesn’t solve your problem, I will advise using a different virtualization system such as VMware Fusion or Parallels Desktop.

  • Worth keeping in mind that almost any virtual machine will install itself this way because of the need to do kernel-level things with the CPU -- it's not like it was lazy programming on the part of the developers of VirtualBox. Only full-emulation VMs can install and run as an ordinary user, and full-emulation is far slower. – Mark Jun 2 at 18:44
  • I didn't say it was lazy programming, nor did I say that VirtualBox is different in this regard compared to many other popular options. However, if you're trying to say that non-full-emulation VMs requires the installation of third party kernel extensions, such as it is done by VirtualBox, then it is actually incorrect. macOS comes with the capabilities built-in for hardware assisted virtualisation without requiring you to install a third party kernel extension. – jksoegaard Jun 2 at 19:08
  • 1
    It doesn't matter what my settings are, they still shouldn't crash the OS and make the computer restart. I did make sure that I am running the latest everything, and it still crashes. I also tried previous versions of virtualbox, but, alas, they don't work either. – hey_you Jun 9 at 5:48
  • Of course it is never supposed to crash your computer - but bugs happen - also in VirtualBox. I have had a lot of experience with VirtualBox, and I have seen quite a few bugs compared to VMware. Especially in the accelerated graphics drivers. – jksoegaard Jun 9 at 7:23
0

Random crashes have happened to me several times after upgrading from VirtualBox 5.2 to 6.0. If you are using 6.0, try downgrading to 5.2.

jrh

  • Tried. Didn't work. – hey_you Jun 29 at 6:11
  • I have the latest Virtual Box and MacPro and it always shuts down the mac when I start Ubuntu 18.04. Then it loads up fine after the restart. – timv Aug 28 at 2:44
  • Hello and sorry about commenting on this late, but this should be a comment rather than an answer (as it doesn't answer the question). – Sam Sep 9 at 17:23
0

I found this worked for us:

VirtualBoxVM --startvm <name|UUID>
New contributor
Greg Parsons is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • 1
    Hello, and welcome to Ask Different. In your answer, would you please include (1) what this command does, and (2) how to use it properly? Also, this command appears to only start VBox VMs, which doesn't answer the questions of what is happening to cause the crash, and why. Please edit your answer accordingly, as in it's current state it might be removed. – Sam Sep 9 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .