Setting up labtainers on newer Apple Macs

These instructions describe how I was able to get the Labtainer VM running on a Mac with an Apple Silicon CPU. This uses software called UTM to run the VM, so if you don’t have that already then download it and install it on your Mac. The instructions below are based on version 4.6.4, which was the latest version available when I wrote this (Jan 21, 2025).

After installing UTM, download the “QCOW2” file from the Labtainers VM images page. Open the downloads folder in Finder, and you’ll see the zip file you just downloaded. Double-click on this to extract the qcow file from the zip archive.

Now you need to set up UTM.

  1. Open UTM and you’ll see four big buttons. Click the “Create New Virtual Machine” button, and on the following screens select “Emulate”, “Other”, and then change the boot device to “None” and continue. On the next page, accept defaults except bump up the CPU cores to at least 2. Other defaults can be kept.

  2. Storage: Go ahead and accept the default, but you’re going to kill this drive in the next step so it’s not very important.

  3. On the final page, I’d recommend that you change the name of the VM to something meaningful (with “Labtainer” in the name, for example), check the “Open VM Settings” option, and continue.

  4. When the settings screen comes up, click on the IDE drive and then click on “Delete” at the bottom. Then click “New” under drives, select “IDE”, click “Import”, and then select the qcow file that you extracted from the zip file earlier. After setting that up, go into the “QEMU” part of settings and uncheck the “UEFI Boot” option. Finally, click “Save”.

You should be ready to go now! Start up the VM (the button that looks like a “play” button. You should (within 30 seconds) see the Ubuntu boot screen, but then it will go black.

You must be patient here. This is slow. I mean very slow. It took around 10 minutes for the VM to boot up on my Mac (admittedly an older M1-based Mac). It will stay on a black screen with just a basic “X” cursor for a long time. You will question whether it is stuck. You may question other life choices. I would recommend just walking away and coming back later. Yes, it’s that frustrating.

Eventually the Ubuntu desktop will come up. For some reason, when I did this on the Mac, the initial student terminal window did not open like it does on Intel-based VMs. You’ll need to start the terminal manually: Click on the terminal launch icon on the left, and then do “cd labtainer/labtainer-student”. Now you’re ready to go.

Do keep in mind that this will be slow. While working it’s not the 10-minute-boot frustration, but it will be a little sluggish. Be prepared (and be patient).