running oracle virtualbox on macos 11.6 big sur

I run Linux virtual machines on my MacBook Pro. The MBP is a mid-2019 machine with an i9, 64 GiB of memory, and 4 TB of SSD. It is a powerful developer machine that has been in constant use since I purchased it last June.

One of the tasks I use the MBP for is running Linux virtual machines. For that purpose, there are two well-known tools; Oracle’s VirtualBox, which is open source and free, and Parallels Desktop, which is commercial. Both are capable of running most Linux distributions I care about, and Parallels is known for running Windows, and rather seamlessly, on the macOS desktop. The only problem is I have no need to run Windows as a VM, as the critical application Office is available as a native macOS application.

One major difference between VirtualBox and Parallels is that VirtualBox appears to need a kernel extension installed for its VMs to operate. VirtualBox ran just fine until I updated macOS to 11.6. It ran without issue on every release before that. When I stepped up to Big Sur 11.6, VirtualBox VMs would no longer boot.

Every time I would attempt to start a VirtualBox VM, I would get something like the following:

along with this:

Very annoying to say the least. I finally solved the problem thusly:

  • Boot the MBP into macOS recovery mode following these directions: https://support.apple.com/en-za/HT201314
  • When in recovery mode, open a terminal (Utilities > Terminal), using the menus on the upper left.
  • In the terminal execute csrutil enable --without kext
  • In the terminal execute spctl kext-consent disable

Then reboot out of recovery mode and back into macOS. The next time you attempt to start a VirtualBox VM, you will succeed.

I ran into another issue when I upgraded from VirtualBox 6.1.26 to 6.1.28. Under 6.1.28 I ran into the same VM boot issue, even though the documented changes were still in place. When I downgraded back to 6.1.26 it all started to work again.

If you’re wondering why I just don’t run everything under Parallels, it’s because Fedora and some of the other distributions I need to run don’t work very well with Parallels. The only distribution that works without issue under Parallels, regardless of version, is Ubuntu or Ubuntu derived distributions. Most of the time I’m quite OK with Ubuntu, but every now and then I need to I need to dip into Fedora.

My final thoughts on all of this: I spent six grand on this MBP. It’s my MBP, and as far as I’m concerned it will do what I want it to do, not what someone else feels it should be doing. Installing and running a kernel extension on macOS should not be a problem, and blocking it from installing is laziness on someone’s part who’ve decided perhaps it’s too much trouble to make sure that capability continues to work from release to release. I’m sure that trying to get a kernel extension running on top of Apple Silicon probably doesn’t work at all, which is why I’m not rushing out to get a new machine using it. I’m not interested in finding out that I can no longer dive into the internals and do what I want it to do.

dealing with buggy software: visual studio code rendering issue

Ubuntu 20.04.2 running as a full desktop VM within Parallels on macOS 11.2.2

I have for some time now been running multiple versions of Linux as VMs on my 2019 MacBook Pro via Parallels. Up to this point everything has run smoothly. Until recently, that is, with Visual Studio Code. For whatever reason, something was altered within VSCode that causes it to completely render the display either as you see it above, or if I resize the window, as a red-only window with the white, in which the black is replaced with red. I at least traced to the release where the problem did not occur to 1.52.1, the November 2020 release. Every release since then has exhibited this problem.

Normally I’d take this as something of a challenge and try to find and fix the issue, but before I decided to dive in and look into it I fired up a RHEL 8.3 VM. I had VSCode installed on it and I needed to do some rather quick code work inside VSCode. I have all my VMs sharing common data using a folder on the Mac so it’s rather easy to keep data and source code easily synced. Unfortunately the same problem reared its ugly head on the RHEL VM.

I believe that there is something unique about the current release of VSCode that causes it to improperly render when running within a Parallels Linux VM.

In the mean time I’ve dropped back to VSCode 1.52.1 and blocked it from being updated. I’ve also built and installed Emacs 28, just like I did on the Nvidia Xavier under Ubuntu 18.04. If this problem remains unsolved in VSCode then it looks like I’ll stick with Emacs.