UTM
UTM copied to clipboard
Linux fails to boot in QEMU VMs when UTM is installed by Nix
Describe the issue
When I install UTM through Nix and then create a QEMU Linux VM I get the following error:
QEMU error: QEMU exited from an error: qemu-aarch64-softmmu: -drive if=pflash,unit=1,file=/Users/enzime/Library/Containers/com.utmapp.UTM/Data/Documents/Linux 2.utm/Data/efi_vars.fd: Could not open '/Users/enzime/Library/Containers/com.utmapp.UTM/Data/Documents/Linux 2.utm/Data/efi_vars.fd': Permission denied
$ ls -l ~/Library/Containers/com.utmapp.UTM/Data/Documents/Linux\ 2.utm/Data/efi_vars.fd
-r--r--r--@ 1 enzime staff 334848 Jan 1 1970 /Users/enzime/Library/Containers/com.utmapp.UTM/Data/Documents/Linux 2.utm/Data/efi_vars.fd
The permissions and creation date indicate the file is getting copied from the Nix Store which is readonly
If I run:
$ chmod u+w ~/Library/Containers/com.utmapp.UTM/Data/Documents/Linux\ 2.utm/Data/efi_vars.fd
Then the VM works perfectly fine
Related: https://github.com/NixOS/nixpkgs/issues/244663
Configuration
- UTM Version: 4.5.4 (100) from Nix
- macOS Version: 15.0
- Mac Chip (Intel, M1, ...): M1
Debug log
Please update to 15.0.1 and try again
I've just updated to 15.0.1 and I still get the same error
Can you update to 15.1?
Same issue
Until this is released and the package updated in nixpkgs, it looks like the closing PR essentially does this:
$ chmod u+w ~/Library/Containers/com.utmapp.UTM/Data/Documents/nixos-qemu.utm/Data/efi_vars.fd
Running that manually resolved the error for me.