VirtualBox does not support ARM-based architectures like the Apple silicon on these Macs yet so we'll need another option. Multipass from Canonical can launch and run virtual machines (instances) and configure them with cloud-init like a public cloud. In fact it's my preferred way to launch Ubuntu instances regardless of whether VirtualBox is available for my system.
Get it with Homebrew:
brew install multipass
See the list of images available:
Useful commands when managing instances.
multipass mount /Volumes/USB primary
multipass delete --all
- Create an instance from the Ubuntu 22.04 LTS (Jammy Jellyfish) image.
- Specify the number of CPUs, disk space, and amount of memory to allocate.
- Give it a name. If the name is
primarythe user's home directory is mounted inside the newly launched instance, in
Home. Without any arguments, commands for managing instances will apply to the primary instance.
- Install a desktop environment and a Remote Desktop server.
You can do this with
cloud-init or without it (manual configuration).
Create a configuration file. It will update/upgrade the system, install the packages we need, and create a new user (
cloudy) with a password for us to log in with Remote Desktop. This example uses a plain text password for simplicity but adjust it to your environment's security needs.
cat << EOF > cloud-config.yaml package_upgrade: true packages: - ubuntu-desktop - xrdp - xsel users: - default - name: cloudy sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash lock_passwd: false plain_text_passwd: 'supersecretpwd' EOF
Launch the instance using the configuration file we created:
multipass launch jammy --cloud-init cloud-config.yaml --name primary --cpus 4 --disk 15G --memory 8G
You could also configure the instance manually instead. In this case we don't need to create a new user, we'll just manually set a password for the default user and use that one.
multipass launch jammy --name primary --cpus 4 --disk 15G --memory 8G
Connect to the instance to install a desktop environment and a Remote Desktop server.
sudo apt update && sudo apt upgrade -y sudo apt install ubuntu-desktop xrdp -y
Set a password for the default
ubuntu OS user.
sudo passwd ubuntu
To access the newly-installed desktop we need the IP address of the instance. Find it either by running the
ip addr command within the Ubuntu shell or by running
multipass list on your Mac host.
Then use that IP address to connect with an RDP client like Microsoft Remote Desktop (available on the App Store). You can use the default user
ubuntu if you manually set its password or the user cloud-init created with the password you specified.