I got a new laptop a few days ago and one of my concerns is the compatibility with my day to day work tools. One of them is to virtualize linux instances to emulate a local kubernetes cluster.
Surfing the internet, 99.9% of the results say that you can only do it with Parallels or VMware Fusion, the truth is that I am not a fan of these tools.
However I wanted to try with one of my favorite tools Multipass, which until then I used it with VirtualBox. Unfortunately VirtualBox does not work on M1-Based Mac.
But I was surprised to discover that Canonical had already been working on a version for M1-Based Mac without Virtualbox as of Multipass version 1.18.
I tried it and in two steps I had an instance of ubuntu running on my m1 based mac.
Below I quote the two steps needed:
Install Multipass for macOS at this link.
Open the terminal and run:
$ multipass launch --name node1
Fifty seconds later ...
We can check the instance type with the following command:
$ multipass exec node1 -- lsb_release -a
We can also enter to our Ubuntu instance:
Do not forget to stop your instance when you are not using it, you can even delete it completely if necessary. With the following commands:
$ multipass stop node1
$ multipass delete node1
$ multipass purge
If you wish, you can adjust the resources assigned to your instance, to generate several of them. You can view the available properties when running a new instance with the following command:
$ multipass launch -h
I hope you find it helpful, thank you very much for reaching the end of the post :).
Happy hacking!