Reading:
VirtualBox on MacOS Catalina: But it works on my machine!

Image

VirtualBox on MacOS Catalina: But it works on my machine!

VirtualBox network is not working?

“It Works on My Machine”: the mystery behind an inaccessible VirtualBox VM on MacOS Catalina.

In one of our recent migration projects, we came across one of those unfortunate incidents when you hear an application “works fine on my machine” and no amount of pleading or crying can provide a clue as to why it will not do so anywhere else… 🙄.

VirtualBox: It works on my machine

The project in question made use of Vagrant + VirtualBox for local environment deployment and testing. One of the developers had his own customised version of a VagrantBox, and for him everything worked like a charm. Let’s call him Developer 1. His workstation ran VirtualBox v6.1.34 + Vagrant 2.2.x + Ubuntu.

His teammate, on the other hand — Developer 2 needed to update his local environment. His own workstation was a combination of MacOS + VirtualBox v6.1.24 + Vagrant 2.1.x.

Consequently, at least on paper, Developer 2’s plan looked fairly simple:

  • Step 1: Upgrade his versions of VirtualBox + Vagrant (it was essential to use unified versions)
  • Step 2: Install all other elements of the project.

Both steps were completed without any errors, and yet the results were far from expected — now the website, which was deployed within VirtualBox, was somehow inaccessible. What the –?

This was yet another mystery, so the team put on their thinking caps and as a result took the following measures:

Within the VirtualBox instance itself, everything seemed to be working well, without any apparent issues.

The team then decided to switch gears and check the VirtualBox host accessibility from the outside — using a simple ping command — which unexpectedly revealed that 100% of the packets were lost. While this was somewhat disheartening, it was a possible culprit for the entire conundrum.

They then followed this trail of breadcrumbs, and after a thorough investigation discovered that since the VirtualBox v6.1.30 update (a patch update, irony of ironies) HostOnly adapters have had to receive a different range of IP addresses:

192.168.55.х before the update

192.168.56.х after the update.

There it was hidden in plain sight in VirtualBox’s updated user manual:

 “On Linux, Mac OS X and Solaris, Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters.”

User Manual

This was definitely an aha moment for everyone. After creating a new HostOnly adapter and replacing the one in the VirtualBox instance, the problem magically disappeared, the required web portion of the solution became suddenly accessible again and Developer 2 was finally content.

*Phew*. So that was finally dealt with, but the entire ordeal reminded us of the memetastically iconic Phyllis:

Phyllis "Works on My Machine" Meme

May she live forever.

Related Stories

Common Issues and Robust Solutions_Enhancing Security in Fintech Projects
May 21, 2024

Common Issues and Robust Solutions: Enhancing Security in Fintech Projects

Security is paramount in RegTech and FinTech projects. Even when designed with security in mind, software solutions become vulnerable and less secure over time.

What Affects a Project Schedule A Load Balancing Story
April 3, 2024

What Affects a Project Schedule: A Load Balancing Story

When assessing the scope of a new project, we always do our best to estimate the required level of effort as accurately as we possibly can. After all, two of the three sides of the iron triangle of project management depend on it: the time and the budget.

Featured Image AWS EKS Kubernetes access trap
February 3, 2021

The Amazon EKS Access Trap

When it comes to Amazon EKS, your cluster creators matter. Let's look at Kubernetes clusters and the importance of keeping control over your infrastructure.