This repository reproduces an issue I'm seeing: when installing NixOS with Linux Kernel 5.14, the VM spins to 100% CPU on boot (but never makes it past what looks like the EFI screen perhaps). This only happens on Fusion Public Tech Preview on Apple M1, and does NOT happen on Fusion 12 on Intel.
This matters because open-vm-tools
requires at least kernel 5.14 for
GUI support and that matters for my use case.
- Apple computer with an Apple M1 chip
- VMware Fusion for Apple Silicon Public Tech Preview
- Docker Desktop to build the NixOS aarch64 ISO
All of these steps must be run on an M1 Mac computer. If you run it on an Intel machine there is no bug.
-
make nixos.iso
- This will create the NixOS ISO. If you want to recreate the ISO you must delete the old one. This will place the ISO in the current directory asnixos.iso
. -
Create a VM in Fusion (manually). Settings I used:
- From
nixos.iso
- 4 CPUs, 8192 RAM.
- 150 GB disk, SATA important: switch NVMe to SATA! The Makefile assumes SATA device paths.
- Full resolution display
- Boot it up. You'll log in automatically as the
nixos
user. Go to the root user and set the password to "root":
$ sudo su
$ passwd
-
Get the IP address, should be
192.168.something
fromifconfig
. -
Optional: Take a snapshot here if you want to try this multiple times.
-
Set
NIXADDR=<ip address of VM>
and runmake vm/bootstrap-broken
. This will reproduce the bug and automatically reboot the VM. Your CPU should spin to 100% (or 100% times the number of vCPUs). This process takes maybe 10 minutes until the reboot. -
Optional: You can restore from the snapshot and run
make vm/bootstrap-good
which uses a 5.10 kernel which works and does not bug out.