-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Virt-Manager: Can't use UEFI in QEMU #115996
Comments
Tangentially (since it was your initial goal), for |
Works for me:
|
QEMU/KVM works without |
@TredwellGit i created It does not make a difference to add The files I run it as So it's still a mystery what the issue here is. |
|
It is. What do you mean? |
nixpkgs/nixos/modules/virtualisation/libvirtd.nix Lines 200 to 201 in 22b61e5
It is an issue that for /run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd to be linked Nixpkgs requires the system daemon to be enabled if only the user daemon is going to be used. It is also an issue that ~/.config/libvirt/qemu.conf must be configured for user sessions, but not system sessions, to use UEFI.
If you have done both of these, then there is another different issue. |
I marked this as stale due to inactivity. → More info |
I marked this as stale due to inactivity. → More info |
This is still an issue |
Hi, I still have the same issue, I can't find any OVMF file where it should be :
|
homebrew-installed libvirt seems to work fine for VMs on an M1 Mac (https://n8henrie.com/2022/09/linux-vms-on-my-m1-mac/), but with nix-installed libvirt and qemu I'm getting $ nix search nixpkgs#OVMF
* legacyPackages.aarch64-darwin.OVMF (202205)
Sample UEFI firmware for QEMU and KVM
$ nix shell nixpkgs/nixpkgs-unstable#OVMF
error: Package ‘OVMF-202205’ in /nix/store/5y5ndnbgvv6mfknnxv48v1swznc5g6wx-source/pkgs/applications/virtualization/OVMF/default.nix:84 is not supported on ‘aarch64-darwin’, refusing to evaluate. EDIT: Created a separate issue and a PR that gets EFI VM images working on my M1 Mac. |
I found a work around for this bug. Here’s the relevant part of my configuration: {
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
home-manager.users.jayman = { pkgs, ... }: {
home.packages = [ pkgs.virt-manager ];
};
} If I try to create a VM using a “QEMU/KVM User Session” connection, then virt-manager won’t be able to find the UEFI firmware image. If I try to create a VM using a “QEMU/KVM” connection, then virt-manager will find the UEFI firmware image. |
For me, |
It seems that something change on |
This is still an issue. I can't create UEFI VMs in the "Qemu/KVM User Session". It does work in the system-wide session, though. |
For me, even the "Qemu/KVM" session is not working. |
Same here, the QEMU/KVM session doesn't provide a UEFI option. virtualization is enabled in configuration.nix, virt-manager is installed via home-manager. All of my VMs in virt-manager are under "QEMU/KVM", and the files |
I have the same issues. Tried all of the workarounds in this thread. |
I solved this by adding |
That's good to know, but this should really not be necessary. |
To make Windows 11 play nice: virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(nixosUnstable.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
}; Pay attention to the |
@bbqsrc Could you try if it works on Gnome-Boxes for you too? Are you using Virt-Manager? |
I am using virt-manager via X11 over SSH. |
This is still an issue for me, even with the
|
Appears to be moving those files to a different location in
However |
Use `powertop` and ditch `thermald` Also fix Netlify checks and QEMU UEFI Support (See NixOS/nixpkgs#115996)
tl;dr Adding 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}" ]; I don't think the separate The issue is that libvirt doesn't know where to look to find QEMU's firmware descriptor files, so the above configuration expression places them in Something like this could be incorporated into the |
Describe the bug
I want to try out mobile-nixos. So i build the Generic UEFI build (x86_64) und imported the mobile-nixos.img into QEMU using Virt-Manager.
When choosing "Customize configuration before install", there is an option to select UEFI instead of BIOS as Firmware, but UEFI is not available.
To Reproduce
Steps to reproduce the behavior:
virt-manger > File > New Virtual Machine > Select Network Install > URL: https://boot.netboot.xyz/ipxe/netboot.xyz-efi.iso OS: Generic, Forward > Forward > Deselect "Enable storage" > Forward > Click "Customize configuration before install" > Finish
Observe in the "Overview" Tab, that Firmware is "BIOS" and you can't move the selection to "UEFI".
(Click "Cancel Installation")
Expected behavior
UEFI should be selectable.
Additional context
This issue was reported (#25209) and fixed (#25397) before.
This is just an issue of Virt-Manager, it works from CLI:
Notify maintainers
@eelco cc @clefru @bjornfor @peterhoeg
Metadata
"x86_64-linux"
Linux 5.11.2, NixOS, 21.05pre274338.102eb68ceec (Okapi)
yes
yes
nix-env (Nix) 2.3.10
"home-manager-20.09, nixos-21.05pre274338.102eb68ceec, nixos-hardware, nixos-unstable-21.05pre274338.102eb68ceec"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
The text was updated successfully, but these errors were encountered: