NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.08k forks source link

Can't start VMs using UTM on aarch64-darwin #244663

Open michaelCTS opened 1 year ago

michaelCTS commented 1 year ago

Describe the bug

When trying to start a VM on mac, it just fails

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install utm using home-manager (might also have the same
  2. open UTM
  3. Create a new linux VM with 4096 memory,
  4. Attach ubuntu 18.04 x86_64 ISO
  5. Start VM

Expected behavior

The VM should boot up.

Screenshots

Config image

Error image

Additional context

Add any other context about the problem here.

Notify maintainers

@rrbutani

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
- host os: `Darwin 22.5.0, macOS 13.4`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.16.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
madsmtm commented 1 year ago

I fixed it by adding write permissions for the current user to efi_vars.fd. Something like:

chmod +uw ~/Library/Containers/com.utmapp.UTM/Data/Documents/[VM NAME].utm/Data/efi_vars.fd