Virtualizing Ubuntu Linux on MacOS with Apple silicon (M1 chip)

As of March 2022 VirtualBox supports only x86 and AMD64/Intel64 and doesn't support ARM-based systems like Apple M1.

Parallels Desktop for Mac supports Apple M1 chip but requires you to buy a license.

Are there an open source solution for running Ubuntu Linux virtual machine on MacOS with Apple silicon (M1 chip)?

1 Answer

UTM

UTM is a full featured open source virtual machine host for MacOS that supports Apple silicon (M1 chip) -

Follow the instructions to install Ubuntu on UTM -

In my experience there are a few issues with UTM and there is an easier way to run an Ubuntu VM on MacOS.

Multipass

Multipass allows launching and managing Ubuntu VMs with a few CLI commands -

Download Multipass for MacOS -

Run the installer to install Multipass.

Verify the installation:

multipass --help 

Launch Ubuntu 20.04 LTS VM called MyUbuntu (2 CPUs, 3GB RAM, 10GB HDD):

multipass launch --cpus 2 --mem 3G --disk 10G --name MyUbuntu 20.04 

Mount a home directory to share data between your host and the VM instance:

multipass mount $HOME MyUbuntu:Home 

Open a shell prompt on a VM instance:

multipass sh MyUbuntu 

Inside the VM shell you are logged as ubuntu user with passwordless sudo.

Interact with the instance, for example list mounted home directory:

ls ~/Home/ 

If you want to have GUI, install Ubuntu Desktop and xrdp:

sudo apt update sudo apt install ubuntu-desktop xrdp 

Set password for user ubuntu

sudo passwd ubuntu 

Reboot the VM instance:

sudo reboot 

Wait for the VM to restart.

Find the IP address (IPv4) of the VM:

multipass ls Name State IPv4 Image MyUbuntu Running 192.168.xx.xx Ubuntu 20.04 LTS 

Or find the IP address using jq in a single command:

multipass ls --format json | jq ".list[0].ipv4[0]" 

Install Microsoft Remote Desktop -

Open Microsoft Remote Desktop.

Click Add PC:

  • PC name: <VM instance IP address>
  • Friendly name: MyUbuntu

Edit PC

Click Add User Account...:

  • Username: ubuntu
  • Password: <your password>
  • Friendly name: ubuntu

Add User Account

MyUbuntu click ... > Connect

Connect

After entering the password enjoy Ubuntu Desktop:

Ubuntu xrdp

To delete the VM instance run:

multipass delete MyUbuntu multipass purge 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like