Maybe I'm just really out of my depth on this, but it feels like there's not a lot of information about _why_ these particular steps and tools are used. Why are 4 different Linux images needed? Why are there all of these steps to create a one-time use "init.iso"? Is it just so the cloud-init script can run? I see the call to mkisofs is referencing "cidata", but it's the only place in the whole page that "cidata" shows up. Does that mean mkisofs is cloud-init aware? And why use emulation instead of virtualization?
I guess part of why I'm asking is because I've set up virtual machines in UTM on Apple Silicon before, and I never had to go through all of this just to get Linux installed and configured. The post makes me wonder if there's something I'm maybe missing, but it doesn't give any explanation for me to be able to figure out if that's the case. Maybe the post is meant more just as a checklist for the person that wrote it, for their own reference? But the way the post reads doesn't quite sound that way.
Hmm... that's all coming out sounding more critical than I mean to. I just want more info and I am curious about the approach.
If you just need a single Linux VM, you don't need to fiddle with cloud-init. If you want repeatability or automation, that's when you'd reach for it, whether for setting up per-project VMs, shareable VM configs between developers etc.
Also, you don't need all 4 Linux images, just the one you want to run as your guest OS. Emulation / virtualization depends on the guest OS CPU architecture.
From my understanding, you really need only one image – the article is just providing four for your tastes (Fedora/Ubuntu, aarch64/x86_64). The images are linux installers, which “understand” cloud-init (because it’s “industry standard”), so if you place the {user,meta}-data file in the right place (a volume named CIDATA, it seems[0]), they can configure your installation without really having to go through the tedious process of configuring through the installation process, install packages, and so on.
I don’t understand why anyone would go to the route of emulation in 2025, but if someone wants to run an x86_64 image with UTM, well that’s the only route – I’d suggest just going to an aarch64 image. Things were a bit more rough back in 2020, but stuff got much better and I don’t remember any compatibility problems these days.
My thought was why use UTM? Most of this can be achieved with qemu alone :). But it showed me something new. The cloud init tool was new to me. From my toolbox I would have used ansible or something. But I think it very interesting that this runs all automatically during first boot.
But I agree one needs to read between the lines to understand what the purpose of this post is. As you said it reads like a overcomplicated install setup.
From the title, I hoped so much that this was about using UTM on Apple Silicon iPads – don’t really want the person who always complains about Apple, but it’s really a pity that the iPad has such a strong CPU inside (I own an M4 iPad Pro) and can’t do any realistic development on it.
Last time I checked, there really isn’t any way to virtualize ARM machines on the iPad with UTM (unless you’re on a lower iOS version), and emulating x86_64 machines were slow enough (even on M4 iPads) and not really usable.
I’m on an environment where iPads are fine but equivalent MacBooks aren’t (stupid rules), and got this machine for hope that I might tinker development with iPads, but I gave up running stuff locally and just boot up an EC2 instance whenever I really want to do something. It’s a pity.
(BTW, from the article, why would anyone really emulate a Linux machine with UTM on Apple Silicon? From my experience ARM64 Linux images are really good at compatibility…)
Ever since I discovered OrbStack, my M1 has become the perfect laptop for me. OrbStack has great UX, massive FS performance, Docker & Kubernetes support, and a bunch of really clever people behind it. Everyone doing linux development on a Mac should try it
Edit to add: While researching OrbStack, I found this comment in a post from 7 months ago that mirrors a lot about my experience with Colima: https://news.ycombinator.com/item?id=41424044
Orbstack is great! I'm wondering why there is not an open-source equivalent? Did they have to reimplement a lot of the native calls to make it work fast enough?
UTM is great when you’re using native ARM versions of Linux or Windows. Where it (or QEMU) is absolutely terrible is trying to emulate x86 for working on legacy apps or for retro computing.
For example, try installing a Windows 2000 vm. It won’t even get past the initial setup screen because it runs so slowly.
My saving grace has been that Windows 11 ARM also has its own x86 translation layer, so I can still run many (but not all) 32bit windows apps. But it’s been frustrating having such a powerful machine that can’t run an x86 vm.
WINE also runs under Rosetta and can handle 32-bit apps, which can help improve x86 32-bit Windows app coverage. Not everything runs well under it but it has settings for which version of Windows it simulates which allows it to run some things that 11 can’t.
I really like UTM, I especially like UTM remote on the iPad.
The issue is that of course Apple computers that are large enough to run VMs are… expensive.
So I have instead found myself using proxmox on a cheaper (by comparison) threadripper machine.
The added bonus is that xterm.js (the default LXC console viewer) works wonderfully on the iPad- Though of course you can use prompt3 for heavier duty stuff.
The other uses I have for VMs on the mac is Docker and Kubernetes, but those are solved by colima and minikube respectively.
> The issue is that of course Apple computers that are large enough to run VMs are… expensive.
Expensive compared to what? UTM uses Apple Virtualization Framework, which lets the guest VM only occupy as much memory as it's actually using (instead of reserving all of its available memory). This means it's viable to run a Linux VM on e.g. an 8GB RAM MacBook Air.
Love it. Also using UTM with Amazon Linux 2023 x64 on an M1 works, so you can create a local HashiCorp Packer Pipeline using the Packer UTM plugin (similar to the QEMU Packer plugin)
A lot of dev tooling still expects x86_64. Example off the top of my head, Cosmopolitan will not build ARM binaries and will not compile on ARM. (But it WILL build x86_64 universal binaries that will run on Apple Silicon and macOS via Rosetta.)
There is also the issue of wanting to have your dev environment be as close to your prod environment as possible, and the vast majority of cloud-based hosting is still x86_64.
I’n about to embark on my first Apple Silicon machine tomorrow, and UTM is a core part of my plans for it. The difference from TFA, for me, is that I already have some mature Nix flakes for doing development in WSL that I’ve built up over the last year. If I can’t have that environment bake a VM for me wholesale, it’s probably a short `nixos-rebuild switch --flake` away.
Although I would'e loved to use UTM, it's still a resource hog. OrbStack (machines) does such a great job at being lightweight.
Is it already possible to connect an external screen to UTM and use that as the main screen? (Multi-port Adapter or iOS, or a displaylink usb dongle on Macbook).
That would enable some great stuff. Until then, I don't think the overhead is worth it for me
The most severe limitation that I've found is inability to work both with x86 (Rosetta) and USB passsthrough. qemu does not support Rosetta and Virtualization.Framework does not support USB passthrough. In the end, I abandoned Macbook and moved to Thinkpad because of that.
UTM is such a high quality mac app, up there with Preview.app. I use the free version distributed via homebrew. But if you find the software useful, highly recommend you either pay for it via mac app store or donate which can be done via github sponsors.
The docs for UTM seem to indicate that jailbreaking or sideloading is required, and with my current reliance on the Apple stack (macs, HomePods, tv etc) I really worry about getting my account banned - even though I’d only ever use this for development.
UTM requires jailbreaking/sideloading to install on iOS because it violates App Store policies so it can't be distributed via the App Store.
On macOS the Mac App Store has much less restrictive policies so UTM is actually approved to be installed via the Mac App Store. https://apps.apple.com/us/app/utm-virtual-machines/id1538878... Also macOS allows you to install and run applications which aren't approved by the Mac App Store. So using UTM as described in the article doesn't violate any Apple policies.
UTM is the one thing I wish I could run on my iPad - with a JIT or proper virtualization (right now you can only run UTM SE with very slow and battery draining emulation).
Has anyone tried emulating linux/amd64 on Silicon with GPU support? I'm testing an engine to run LLMs locally that only runs on that, no support for arm.
[+] [-] thinker5555|11 months ago|reply
I guess part of why I'm asking is because I've set up virtual machines in UTM on Apple Silicon before, and I never had to go through all of this just to get Linux installed and configured. The post makes me wonder if there's something I'm maybe missing, but it doesn't give any explanation for me to be able to figure out if that's the case. Maybe the post is meant more just as a checklist for the person that wrote it, for their own reference? But the way the post reads doesn't quite sound that way.
Hmm... that's all coming out sounding more critical than I mean to. I just want more info and I am curious about the approach.
[+] [-] Zanfa|11 months ago|reply
Also, you don't need all 4 Linux images, just the one you want to run as your guest OS. Emulation / virtualization depends on the guest OS CPU architecture.
[+] [-] goranmoomin|11 months ago|reply
I don’t understand why anyone would go to the route of emulation in 2025, but if someone wants to run an x86_64 image with UTM, well that’s the only route – I’d suggest just going to an aarch64 image. Things were a bit more rough back in 2020, but stuff got much better and I don’t remember any compatibility problems these days.
[0] https://cloudinit.readthedocs.io/en/latest/reference/datasou...
[+] [-] larusso|11 months ago|reply
[+] [-] goranmoomin|11 months ago|reply
Last time I checked, there really isn’t any way to virtualize ARM machines on the iPad with UTM (unless you’re on a lower iOS version), and emulating x86_64 machines were slow enough (even on M4 iPads) and not really usable.
I’m on an environment where iPads are fine but equivalent MacBooks aren’t (stupid rules), and got this machine for hope that I might tinker development with iPads, but I gave up running stuff locally and just boot up an EC2 instance whenever I really want to do something. It’s a pity.
(BTW, from the article, why would anyone really emulate a Linux machine with UTM on Apple Silicon? From my experience ARM64 Linux images are really good at compatibility…)
[+] [-] SSLy|11 months ago|reply
[+] [-] anpep|11 months ago|reply
[+] [-] eddyg|11 months ago|reply
I'm interested in an up-to-date comparison when running the VM with Rosetta 2:
⁽¹⁾ https://github.com/abiosoft/colimaEdit to add: While researching OrbStack, I found this comment in a post from 7 months ago that mirrors a lot about my experience with Colima: https://news.ycombinator.com/item?id=41424044
[+] [-] corv|11 months ago|reply
[+] [-] oulipo|11 months ago|reply
[+] [-] asadalt|11 months ago|reply
[+] [-] trollied|11 months ago|reply
[+] [-] treesknees|11 months ago|reply
For example, try installing a Windows 2000 vm. It won’t even get past the initial setup screen because it runs so slowly.
My saving grace has been that Windows 11 ARM also has its own x86 translation layer, so I can still run many (but not all) 32bit windows apps. But it’s been frustrating having such a powerful machine that can’t run an x86 vm.
[+] [-] cosmic_cheese|11 months ago|reply
[+] [-] dijit|11 months ago|reply
The issue is that of course Apple computers that are large enough to run VMs are… expensive.
So I have instead found myself using proxmox on a cheaper (by comparison) threadripper machine.
The added bonus is that xterm.js (the default LXC console viewer) works wonderfully on the iPad- Though of course you can use prompt3 for heavier duty stuff.
The other uses I have for VMs on the mac is Docker and Kubernetes, but those are solved by colima and minikube respectively.
[+] [-] runeks|11 months ago|reply
Expensive compared to what? UTM uses Apple Virtualization Framework, which lets the guest VM only occupy as much memory as it's actually using (instead of reserving all of its available memory). This means it's viable to run a Linux VM on e.g. an 8GB RAM MacBook Air.
[+] [-] weitzj|11 months ago|reply
source "utm-cloud" "this" { iso_url = "${path.root}/dev_images/al2023-kvm-2023.6.20250303.0-kernel-6.1-x86_64.xfs.gpt.qcow2" iso_checksum = "sha256:0dc2797fe19847f6c75878dd344ab478ac0657077d9a15f2907bb2df41d8c3de" vm_arch = "x86_64" cpus = 2 memory = 4096 display_nopause = true boot_nopause = true export_nopause = true skip_nat_mapping = true communicator = "ssh" ssh_clear_authorized_keys = true ssh_private_key_file = data.sshkey.this.private_key_path ssh_host = "192.168.64.100" ssh_port = 22 ssh_username = "ec2-user" shutdown_command = "echo 'packer' | sudo -S /sbin/halt -h -p" use_cd = true cd_label = "cidata" cd_content = { "meta-data" = <<EOF local-hostname: vm-hostname EOF "user-data" = <<EOF #cloud-config ssh_sftp: enabled: true password: ec2-user ssh_pwauth: True chpasswd: expire: False users: - default - name: ec2-user lock_passwd: false plain_text_passwd: ec2-user ssh_authorized_keys: - ${data.sshkey.this.public_key} EOF "network-config" = <<EOF #cloud-config version: 2 ethernets: enp0s1: # dhcp4: yes addresses: - 192.168.64.100/24 gateway4: 192.168.64.1 nameservers: addresses: - 10.0.2.2 enp0s2: dhcp4: no state: down EOF } }
[+] [-] sorenbs|11 months ago|reply
[+] [-] twsted|11 months ago|reply
[+] [-] robin_reala|11 months ago|reply
[+] [-] misja111|11 months ago|reply
[+] [-] pmarreck|11 months ago|reply
There is also the issue of wanting to have your dev environment be as close to your prod environment as possible, and the vast majority of cloud-based hosting is still x86_64.
[+] [-] twarge|11 months ago|reply
https://mac.getutm.app/gallery/
[+] [-] JSR_FDED|11 months ago|reply
[+] [-] teeray|11 months ago|reply
[+] [-] rcarmo|11 months ago|reply
[+] [-] jbverschoor|11 months ago|reply
Is it already possible to connect an external screen to UTM and use that as the main screen? (Multi-port Adapter or iOS, or a displaylink usb dongle on Macbook).
That would enable some great stuff. Until then, I don't think the overhead is worth it for me
[+] [-] vbezhenar|11 months ago|reply
[+] [-] sks147|11 months ago|reply
[+] [-] rcarmo|11 months ago|reply
[+] [-] commandersaki|11 months ago|reply
[+] [-] threecheese|11 months ago|reply
Is this an unreasonable fear?
[+] [-] voxic11|11 months ago|reply
On macOS the Mac App Store has much less restrictive policies so UTM is actually approved to be installed via the Mac App Store. https://apps.apple.com/us/app/utm-virtual-machines/id1538878... Also macOS allows you to install and run applications which aren't approved by the Mac App Store. So using UTM as described in the article doesn't violate any Apple policies.
[+] [-] nottorp|11 months ago|reply
Edit: would command line linux be usable, considering it doesn't have to emulate all those pixels?
[+] [-] runeks|11 months ago|reply
[+] [-] unknown|11 months ago|reply
[deleted]
[+] [-] rcarmo|11 months ago|reply
[+] [-] elchiapp|11 months ago|reply