Running a Pop!_OS Linux VM on an Apple Silicon Mac

Tags
Linux
Tech
Apple
Software Development
Pop!_OS
Published
Author
I was an early adopter of Apple Silicon, receiving my 13” M1 MacBook Pro on its general release day. Support for familiar software and systems was a bit sparse, which led to the temporary disruption of some of my favorite tools such as Homebrew, Docker, and the ability to run virtual machines.
Over time, Homebrew was updated to work correctly and reliably, and Docker Desktop paved the way for virtualization on Apple Silicon. Tools like Parallels and VMWare Fusion have also been updated to provide support for running virtual machines on Apple Silicon, despite claims that it seemed virtualization would never arrive.

Installing a Pop!_OS VM

I have been curious about Pop!_OS for some time. It appears to be the most macOS-like of the Linux distributions, with a reasonable design aesthetic and focus on STEM applications. It unfortunately (as of the time of writing) does not appear to have a functional ARM installer, so getting it up and running on Apple Silicon is very convoluted.
 
Preparation
  1. Download and setup VMWare Fusion Player (free for personal use)
  1. Download an Ubuntu server for ARM installer ISO (make sure to download the 22.04 build): https://ubuntu.com/download/server/arm
  1. Open Parallels and create a new VM, using the following settings:
    1. Select “Install Windows or another OS from a DVD or image file”
  1. Select the Ubuntu Server arm64 iso downloaded previously (you might need to click “Choose Manually”)
  1. Give the new virtual machine a name, and optionally enable “Customize settings before installation” to tweak the amount of memory, CPU cores, and storage that will be assigned to the VM
Installing Ubuntu Server
Note: these steps may change if the Ubuntu Server installer is updated; follow the instructions displayed on the installer itself, rather than this guide, if something does not match
  1. Start the new VM and select the “Ubuntu Server” GRUB entry
  1. Note: during this section, you can safely ignore any “failed to unmount /cdrom” and/or “Firmware bug” errors, if they appear
  1. Select your desired language from the list
  1. If prompted, select “update to the new installer”
  1. Select your device’s keyboard layout
  1. Select “Done” to install the non-minimized Ubuntu Server build
  1. Select “Done” to accept the default network configuration shown
  1. Select “Done” to skip setting up a network proxy
  1. Select “Done” to accept the default Ubuntu mirror
  1. Select “Done” to install to the entire virtual disk
  1. Select “Done” to accept the default partition layout
  1. Select “Continue” to begin installing Ubuntu Server
  1. Enter a username and password for your user
  1. If you want SSH access to the virtual machine, enable “Install OpenSSH server”
  1. Having SSH access will make later parts of this guide easier, as it will allow you to copy-paste commands into the terminal, rather than having to type them manually
  1. Select “Done” to skip installing any server-specific packages
  1. Wait until the installation is complete (including updates), then select “Reboot Now”
notion image
notion image
The base OS has been installed, but the updates             The installation has completed, including
have not yet finished installing; do not reboot yet                      all updates; you can reboot now
  1. Press “Enter” when prompted to remove the installation medium
Installing Pop OS on top of Ubuntu Server
  1. Your virtual machine should have rebooted into a terminal login prompt
  1. If you chose to install an SSH server, you can connect to the VM via ssh (short external guide)
  1. Otherwise, sign in using the username and password entered previously
  1. You may need to press Enter once if an “Ubuntu 21.10” header, but no login prompt, is shown
  1. Remove unnecessary Ubuntu Server-specific packages
    1. sudo apt purge --autoremove ubuntu-server -y
  1. Add the Pop OS ISO signing key
    1. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $(curl https://gist.githubusercontent.com/voidrender/626205dcc17f993eab9ceb527ed612d7/raw/b24902c51145040df8fde12a7f72cda4ab7e331e/pop_os_signing_key.txt)
  1. Add the Pop OS APT repositories
sudo add-apt-repository "deb http://apt.pop-os.org/release $(lsb_release -cs) main" -y
sudo add-apt-repository "deb http://apt.pop-os.org/staging/master $(lsb_release -cs) main" -y
sudo apt update -y && sudo apt full-upgrade -y
  1. Install the Pop-OS desktop environment
sudo apt install pop-desktop-raspi -y
  1. Uninstall the Raspberry Pi-specific kernel installed by the previous step
sudo apt purge --autoremove linux*-raspi* -y
  1. This will make Pop-OS use the standard Ubuntu Server kernel; not running this command will cause the VM to not boot, as it will attempt to use the incompatible Pi kernel instead
  1. Fix the Pop-OS APT sources
sudo sed -i 's/Enabled: yes/Enabled: no/g' /etc/apt/sources.list.d/system.sources /etc/apt/sources.list.d/pop-os-apps.sources
Or, alternatively, edit the files /etc/apt/sources.list.d/system.sources and /etc/apt/sources.list.d/pop-os-apps.sources, and replace Enabled: yes  with Enabled: no in both.
  1. Ensure all packages are up to date
sudo apt update -y && sudo apt full-upgrade -y
  1. Enter reboot to restart the virtual machine
  1. Log in to Pop!_OS and complete the setup questions