Introduction
“Multipass” is used to create and launch Ubuntu instances on the local machine with each platform’s native hypervisor, the same as many cloud providers do.
The default backend on MacOS M1 is qemu. Multipass can be used for any M1 Mac with macOS 10.14 or higher installed.
This document is aimed at explaining Multipass installation and configuration on MacOS with M1 Chip. The command line installation option will discuss.
Environment
MacOS V12.4 M1 Chip
Steps
Ensure “brew” is installed on the MacOS. If not, install the “brew” as explained below. You can find detailed installation information here.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After the installation is complete, run these two commands in your terminal to add Homebrew to your PATH.
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> $HOME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
Install “Multipass” with the following command.
brew install --cask multipass
Run the following command to check if “Multipass” is installed correctly.
% multipass version multipass 1.10.1+mac multipassd 1.10.1+mac4.
List the images for choosing the desired version.
% multipass find Image Aliases Version Description 18.04 bionic 20220712 Ubuntu 18.04 LTS 20.04 focal,lts 20220711 Ubuntu 20.04 LTS 22.04 jammy 20220712 Ubuntu 22.04 LTS anbox-cloud-appliance latest Anbox Cloud Appliance charm-dev latest A development and testing environment for charmers docker latest A Docker environment with Portainer and related tools jellyfin latest Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. minikube latest minikube is local Kubernetes
In this installation, we are using 18.04 image with a “bionic” alias and configuring 2 virtual machines with 2 core CPUs, 40 GB storage, and use en0 as the network.
% multipass launch bionic --name clickhouse01 --cpus 2 --disk 40G --mem 4G --network en0 Launched: clickhouse01 % multipass launch bionic --name clickhouse02 --cpus 2 --disk 40G --mem 4G --network en0 Launched: clickhouse02
After the Installation is complete, the images can be listed shown as below. In this example, the “192.168.1” subnet is used for internet communication over WI-FI and the “192.168.64” subnet is used for interconnection.
% multipass list Name State IPv4 Image clickhouse01 Running 192.168.64.3 Ubuntu 18.04 LTS 192.168.1.XXX clickhouse02 Running 192.168.64.4 Ubuntu 18.04 LTS 192.168.1.YYY
For connecting the “clickhouse01”, the following command is used. You can connect “clickhouse02” and just change the name of the VM.
% multipass shell clickhouse01
If you would like to stop any of the VMs, you can use the “stop” command as shown below. In this example, both of the VMs are stopped and status checked.
~ % multipass stop clickhouse01 ~ % multipass stop clickhouse02 ~ % multipass list Name State IPv4 Image clickhouse01 Stopped -- Ubuntu 18.04 LTS clickhouse02 Stopped -- Ubuntu 18.04 LTS
For detailed information click here