UTM: Run x86 VM on Mac M1
Contents
UTM is a full-featured system emulator and virtual machine host for iOS and macOS. It is based off of QEMU.
Typical tasks
- run docker images designed for amd64(or any other including RISC) on Apple Silicon (M1, M2 chips)
- compile code for amd64(or any other including RISC) on Apple Silicon (M1, M2 chips)
- run and test application developed not for on Apple Silicon (M1, M2 chips)
UTM VM setup for Ubuntu
Get UTM via brew
|
|
Choose:
- [Option A]: install OS from UTM gallery https://mac.getutm.app/gallery/
- [Option B]: Install OS manually. You need ISO file for desired OS!
Below UTM config works for Ubuntu version 14/16/18/22
|
|
If port forwarding configured as above user ubuntu:ubuntu can login via ssh
|
|
File sharing (!to be tested)
- via Spice drive
|
|
- via SMB
|
|
Performance results (not finished)
Benchmarking software used https://github.com/akopytov/sysbench
Prepared:
- Host: MAC Monterey 12.6.1, M1 pro 10 cores, 32GB RAM
1
brew install sysbench
- UTM Emulated guest: Ubuntu 22.04.1 LTS, 4 cores, 4GB RAM
1
sudo apt-get install sysbench
CPU Benchmark results
|
|
Host, threads=1 | Guest, threads=1 | Host, threads=2 | Guest, threads=2 | |
---|---|---|---|---|
events/sec | 134361546 | 14.43 | 25967909.85 | 13.39 |
exec time | 3.4302 | 10.0377 | 8.3293 | 9.9731 |
Increasing of $NUMBER_OF_THREADS just makes the results worse on HOST and GUEST systems
MEM Benchmark results
|
|
H 1 | G 1 | H 2 | G 2 | |
---|---|---|---|---|
— | — | — | — | — |
I/O
Not needed
7zip
|
|
UTM VM setup for Windows 11
Get Windows® 11 installer ISO images by crystalfetch
|
|
To run ARM (AARCH64): create a New Virtual Machine > Virtualize > Windows To run x64 (AMD64): create a New Virtual Machine > Emulate > Windows
Setup wizard options:
|
|
VM Settings:
|
|
Windows setup network issue: https://docs.getutm.app/guides/windows/#networking-does-not-work