This guide will walk through the complete steps for configuring a Linux Ubuntu VM on M1/M2 Mac computers. To be precise, we will cover all the required steps to customize your first Linux VM to run in quickly.
Here are the steps at a high level before you start.
- Install the Virtualization platform, UTM
- Get an ARM-supported OS iso
- Configure a Linux VM on M1/M2 mac
- Getting started with UTM
- Choose Virtualization option
- Choosing the OS flavour
- Linux VM Configuration
- Hardware customization – Memory & CPU
- Storage size settings
- Shared Directory
- Configuration Summary
- Start the OS installation
- Running the Ubuntu installer
Step #1 Install a Virtualization platform
Software Virtualization has two primary components:
- Host Machine, in our case, this is your m1 / m2-based macOS
- Guest Machine, also called Virtual Machine or VM – in our case, is Ubuntu Linux.
The virtualization platform facilitates the guest os, a Virtual environment. Here we use UTM, so you can run a complete sandbox environment inside your Virtual Machine without impacting any other files on your host-machine base OS.
We have chosen UTM for ARM-based macOS since it is an Open source and a free solution. (there are other platforms available, such as Parallels and VMware Fusion).
To start with:
- Download the free version of UTM virtualization software for your Apple silicon
- Install the UTM app on your macOS.
If you are using the UTM App on mac for the first time, I would recommend you to go to this article first:
Comprehensive guide to setup UTM on M1/M2 macOS
Step #2 Get an ARM-supported OS iso
You would require an ARM-supported Linux Operating system to run Linux on M1/M2-based Mac.
Ubuntu and many other OS currently support arm architecture, and we will use Ubuntu in this guide.
Step #3 Configuring a Linux VM on M1/M2 mac
VM config step #1 Getting started with UTM
Firstly, Open your UTM app, and open a new VM creation menu (the plus symbol)
As mentioned before, please refer to this complete guide on UTM if required. Here is a preview of what the UTM Virtual Machine app console looks like:
UTM Virtualization on m1 mac
VM config step #2 Choose Virtualization option
New VM customization menu, select the Virtualize option.
VM config step #3Choosing the OS flavour
Under the Operating System selection, select Linux since we will be using Ubuntu Linux as our guest OS.
VM config step #4 Linux VM Configuration
From here on, you will get an advanced Linux VM customization menu.
From the first page, map your Ubuntu iso file, as shown below.
You can download the latest version of Ubuntu ARM isos from the official pages, and links are given below.
- Ubuntu 22.04 ARM download
- Ubuntu 20.04.5 LTS (Focal Fossa) ARM download – Desktop & Server versions are available.
VM config step #5 Hardware customization – Memory & CPU
Memory – Under Hardware, you can set the RAM – Memory. I recommend leaving it at the default value (4096 or 4GB).
CPU Selection – again, do not change this unless you are aware of the performance issue to your host OS if you add more virtual CPUs to the guest.
VM config step #6 Storage size settings
I saw the default value is set to 64GB. If this is not suitable for you, you may change it. Please note the space you allocate here will be occupied by your host machine disk.
VM config step #7 Shared Directory
UTM provides a feature to share your MacOS directory with the Linux Guest. I did not use this feature here in this guide for simplicity.
VM config step #8 Configuration Summary
Finally, you will get a summarized view of your advanced VM configurations. You may edit it here, or a few options would be editable even after creating the VM.
VM config step #9 Start the OS installation
Your Virtual Machine hardware is ready with this step. You may change the settings or start the installation.
VM config step #10 Running the Ubuntu installer
When you are ready to start the OS installation, just click the play button and your OS installation menu will come, just like you are installing an OS on a physical computer.
You can follow the OS installation menu options to complete the Ubuntu installation step. I recommend you choose the default options provided by the install Wizard if you are unsure of your changes.
FAQ: Can I change the VM hardware setting after the OS installationYes! When the VM is in the stopped state, you can change most of ( not all ) the VM configurations after the Guest OS iinstallation.
- VirtualBox for Apple m1, How to run VMs on M1 or M2 Macs
- How to install Chrome on Ubuntu Linux
- How to install Ubuntu on VirtualBox ( x86 intel/AMD version)
This how-to guide has covered all steps required to run an Ubuntu Virtual Machine on macOS m1/m2 ARM architecture using UTM Virtualization. My experiment used a MacBook Pro M2, with 16GB Memory and 512GB SSD. The Ubuntu VM performance is excellent. Good luck with your new Virtual Machine development environment!