NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.38k stars 13.61k forks source link

gnome-boxes: can't create a VM with UEFI firmware #318079

Open dawidd6 opened 3 months ago

dawidd6 commented 3 months ago

Describe the bug

When I try to create a simple Ubuntu 24.04 VM from official ISO image with UEFI firmware, I get this error:

Screenshot from 2024-06-07 21-44-06

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install gnome.gnome-boxes package
  2. Run gnome-boxes
  3. Try to create a VM with UEFI firmware

Expected behavior

VM is created and boots just fine.

Screenshots

Shown above.

Notify maintainers

@NixOS/gnome

Metadata

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

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240531.805a384`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/i1aw9jjgxcvyd642s12kw3iasmarwd42-source`

Add a :+1: reaction to issues you find important.

lasandell commented 2 months ago

I encountered this as well. I was able to work around it by adding qemu to my environment.systemPackages and the following snippet to my nixos config (longer explanation here):

systemd.tmpfiles.rules =
  let
    firmware =
      pkgs.runCommandLocal "qemu-firmware" { } ''
        mkdir $out
        cp ${pkgs.qemu}/share/qemu/firmware/*.json $out
        substituteInPlace $out/*.json --replace ${pkgs.qemu} /run/current-system/sw
      '';
  in
  [ "L+ /var/lib/qemu/firmware - - - - ${firmware}" ];
dawidd6 commented 1 month ago

@lasandell this works, thanks!