Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux fails to boot in QEMU VMs when UTM is installed by Nix #6725

Closed
Enzime opened this issue Oct 6, 2024 · 5 comments
Closed

Linux fails to boot in QEMU VMs when UTM is installed by Nix #6725

Enzime opened this issue Oct 6, 2024 · 5 comments
Milestone

Comments

@Enzime
Copy link

Enzime commented Oct 6, 2024

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

Screenshot 2024-10-06 at 9 17 00 pm
$ 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: NixOS/nixpkgs#244663

Configuration

  • UTM Version: 4.5.4 (100) from Nix
  • macOS Version: 15.0
  • Mac Chip (Intel, M1, ...): M1

Debug log

debug.log

@osy
Copy link
Contributor

osy commented Oct 6, 2024

Please update to 15.0.1 and try again

@Enzime
Copy link
Author

Enzime commented Oct 6, 2024

I've just updated to 15.0.1 and I still get the same error

@osy
Copy link
Contributor

osy commented Nov 11, 2024

Can you update to 15.1?

@Enzime
Copy link
Author

Enzime commented Nov 11, 2024

Same issue

@osy osy added this to the v4.6 milestone Nov 11, 2024
@osy osy closed this as completed in ed99b74 Nov 11, 2024
@n8henrie
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants