This is a small guide on how to start Virtual Machines (VMs) on modern Apple Silicon Macs. The motivation is that there are scattered guides about doing this around the internet, and hopefully, this is a good one-stop guide to how to run and play with VMs on your Mac.

Scope

The scope of this guide is that it exclusively uses the open-source QEMU emulation and virtualization software. There are many commercial, free, and paid ones, but I prefer qemu because you can customize how to create your machine. Just like other open-source projects, there is a learning curve to run qemu, but we are touching the basics. All commands are run to ensure that it is working.

To install qemu, you need to install the popular Homebrew package manager for macOS. It is free and very easy to install. You can head to their homepage and follow commands, or just copy those commands here. Just open your terminal and execute the command below. The command should be working at press time.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

To install qemu, just install using the freshly installed Homebrew package manager. The command is as follows:-

brew install qemu

Launch and install Linux

The Plan

The plan is very simple:-

  • Get the installation disk from a Linux Distro website
  • Create an image file to store data
  • Create a machine using qemu. The machine that we create uses the image file to store data and the installation iso disk to install Linux on the machine.

To create an image file to store the data, use this command. It will create a file named disk.qcow, which would have storage up to 8 gigabytes. By default, it would not use up 8 GB of storage on your Mac, but it will grow based on the needs of the VM. The f flag is tell the program to create using their qcow2 format.

qemu create -f qcow2 disk.qcow2 8G 

Download the installation disk from your favourite Linux distro. For this example, we’re using the Debian and Ubuntu distro of Linux because they are quite popular for hobbyists and enterprise users.

Some caveats

Here are some things that you should know when running qemu on Apple Silicon Macs

  • If you are emulating / virtualizing x86 machines (the ones that are sold as AMD or Intel machines), there is no hardware acceleration. Apple Silicon, due to its transition from Intel, can process x86 code architecture quite efficiently.
  • If you are emulating ARM machines, you can use hardware acceleration due to the nature that Apple Silicon are ARM chips.
  • To boot up ARM machines, you need UEFI files to act as the BIOS for the underlying hardware. The files can be found at /opt/homebrew/share/qemu/edk2-aarch64-code.fd if you install qemu using Homebrew. It’s advisable to copy the file to your working folder.

Debian

To install Debian, it would be easier to use the net installer. It’s a smaller file and will download all the install files from the internet. Below is the incantation command to make things work.

qemu-system-aarch64 \
 -M virt,accel=hvf -cpu host \
 -m 1G \
 -bios edk2-aarch64-code.fd \
 -drive if=virtio,format=raw,file=ubuntu.qcow2 \
 -drive if=virtio,format=raw,file=debian-13.1.0-arm64-netinst.iso

A new window will pop up, and it will look like nothing is happening. Most of the action is in the serial channel, so switch by selecting View -> serial0 from the menu.

You can put all output in the command line by using the -nographic flag. If you want to exit the console, press ctrl + a and then x.

Ubuntu

In my experince, using the GUI does not really work. However, using text-based installer or serve iso, it works.

The incantation:

qemu-system-aarch64 -M virt,accel=hvf -cpu host \
	-m 1G \
	-bios edk2-aarch64-code.fd \
	-drive if=virtio,format=qcow2,file=test.qcow2 \
	-drive if=none,id=cdrom,format=raw,file=ubuntu-25.10-live-server-arm64.iso \
	-device virtio-blk,drive=cdrom,bootindex=0

Launch and install a cloud image

Cloud images are pre-installed versions of an OS. The idea is you can attach an image of a disk to a virtual machine and spin up the virtual machine. From the machine’s point of view, it’s just a disk with an OS that is ready to run. Modern OS like Linux are flexible enough to detect hardware changes and run right out of the box without issues.

The problem is how to access the OS that’s running in the VMs. The solution is to configure the SSH (secure shell) server so that it will accept a public key that you create and access the server using your private key.

Another method is to create a special file called user-data that reconfigures the password for a default user. For Linux Ubuntu, the default username is obviously ubuntu. That file will be put in an ISO image with a specific volume name (cidata).

Below is the command to create the user-data file.

cat >user-data <<EOF
#cloud-config
password: asdfqwer
chpasswd: { expire: False }
ssh_pwauth: True
EOF

We can use the built -in command hdiutil (Disk utility) to create the ISO image:-

hdiutil makehybrid -o init.iso \
	-hfs -iso -joliet \
	-default-volume-name cidata \
	config

Now, download the latest cloud image from your favourite distro. You can find Ubuntu cloud images here. After downloading the cloud image, you need to resize the image so you can store some data. Here are the commands:

  • to resize the image, use the qemu-img command
qemu-img resize <image name> +5G

Finally, launch the VM with the cloud image and the user data image:-

qemu-system-aarch64 -M virt,accel=hvf -cpu host \
	-m 1G \
	-bios edk2-aarch64-code.fd \
	-drive if=virtio,format=qcow2,file=plucky-server-cloudimg-arm64.img \
	-cdrom init.iso \
	-net user,hostfwd=tcp::10022-:22 -net nic

After booting up, you should be able to log in with the username ubuntu and the password asdfqwer. In the latest version, direct login is disabled, so you will have to access the VM using SSH. The above command will forward port 10022 from the host server to port 22 on the VM. Port 22, as you may know, is typically used for SSH.

ssh -p 10022 localhost

At this point, there might be some issues trying to connect. Which I’m trying to fix it. Stay tuned for updates.

Conclusion

Using QEMU might have a learning curve, but the tool is built with a lot of customization in mind, making it one of the most powerful tools out there. One thing I’ve learn throughout the process is how standardized x86 systems are, making them a lot easier to work on than other architectures.

To be honest, working with Docker is a lot easier, but QEMU offers more granularity.

Plug

Support this free website by visiting my Amazon affiliate links. Any purchase you make will give me a cut without any extra cost to you

BasePro
iPhonesiPhone 16 / iPhone 16 Plus - (Amazon)iPhone 17 Pro / iPhone 17 Pro Max - (Amazon)
iPhone AccessoriesFind them at Amazon
WatchApple Watch SE (Amazon) / Apple Watch Series 11Apple Watch Ultra 3 (Amazon)
AirPodsAirPods 4 (Amazon)AirPods Pro 3 (Amazon) / AirPods Max (Amazon)
iPadiPad 10 (Amazon) / iPad Mini (Amazon)iPad Air M3 (Amazon) / iPad Pro M5 (Amazon)
LaptopsMacBook Air M3 (Amazon)MacBook Pro M5 (Amazon) / MacBook Pro M4 Pro/ M4 Max (Amazon)
DesktopMac Mini M4 / M4 Pro (Amazon) / iMac M4 (Amazon)Mac Studio / Mac Pro
DisplaysStudio Display (Amazon)Pro Display XDR (Amazon)

Other Ecosystem Items