Guilherme Nicoli

Cyber Warrior / Crypto Anarchist / OSCP / Blockchain Dev

Installing Virtual Box ON Mac OS

Let's say that just like myself you are in a situation where all you have is a Mac Book Pro, and you have no idea when you will be getting access to a windows system. You want to run Virtual Box, but it turns out that you come across a few issues before you get up and running. In this article we are gonna cover the main issues that arise when installing Virtual Box on a Mac OS.
I will assume that you already have the ISO image of the OS that you pretend to run on the virtual machine, so that we can focus on fixing virtual box issue. so that you can launch a virtual machine and just play with Kali as usual. You are all pumped and ready to launch your virtualized environment when you come across the following kernel error:
To be honest, I found this message quite vague and could not make a lot of sense out of it:
On Linux, open returned ENOENT
I had no idea what that meant, so I started the learning journey.
After some investigation, I found out that you have to specifically allow Virtual Box to run by visiting the macOS system preferences, as you can see below:
If you have recently installed Virtual Box, you should be getting the following screen:
By following those steps, you might be ready to go, or not.
It turns out that the allow button shown above will not be there if you have previously installed Virtual Box. This will only be possible if you try to launch your virtualised environment in the first 30 minutes after you have installed Virtual Box.
If you are used to a windows environment, it may be the case that uninstalling a software on Mac OS may not be so straight forward, and you may need to understand the difference between just removing an app and/or uninstalling it completely, by clearing all support files associated with the software. Therefore, before we go on launching our virtual machine, let's make sure we remove virtual box and all its service files.
To start with, go to applications and move Virtual Box to the trash. Then to go trash and delete it permanently.
After that, you have to go to the library folder and remove everything that may be associated with virtual machines launched. In my case, the library folder was hidden so I had to Ctrl click the finder icon and click on "Go to folder", and run the following command which will then show your "hidden library" folder:
Once in here you can now delete all files associated with Virtual Box. Once you cleared everything, it might be that you will still have some Virtual Box files associated to your computer somewhere. Do not ask me why, it is as it is. But you need to get rid off them anyway, otherwise it will not work, and that is something for you to fix.
If that is the case, make sure that you download the latest version of Virtual Box again and run the uninstall script that is offered once the installation wizard is launched.
Then head back to system preferences and click back on allow as we showed previously. If you still have any issues, try to reboot your computer before attempting to install Virtual Box again (after running the uninstall script).
If you followed all the steps, you should now have successfully installed Virtual Box on you Mac OS Machine and the following message should pop up.
That means that you are now ready to start using Virtual Box on Mac.
There are a number of tools and sites online offering one-click uninstall option, but I would recommend you stick to running the uninstall script from the VIrtual Box wizard, since you do not want anyone to insult your intelligence and install malicious software on your machine with your permission.

Tags

More by Guilherme Nicoli

Topics of interest