nixos-config icon indicating copy to clipboard operation
nixos-config copied to clipboard

Installation failed in QEMU/KVM

Open jburget opened this issue 1 year ago • 5 comments

Hello,

I wanted to try out your amazing rice in VM. I created QEMU/KVM virtual machine via Virtual Machine Manager, available on Debian. I have used GNOME iso and installed Nixos with no desktop.

Switching configuratioin as is failed with following error:

efiSysMountPoint = '/boot' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
  File "/nix/store/vxm4wc844sj9c9qdvwbss3y9r9hm5lh5-systemd-boot/bin/systemd-boot-builder", line 394, in <module>
    main()
  File "/nix/store/vxm4wc844sj9c9qdvwbss3y9r9hm5lh5-systemd-boot/bin/systemd-boot-builder", line 374, in main
    subprocess.check_call(CHECK_MOUNTPOINTS)
  File "/nix/store/7wz6hm9i8wljz0hgwz1wqmn2zlbgavrq-python3-3.11.8/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/nix/store/5j0h13ax44xk05b6wwxm1rp57jqcjnd2-check-mountpoints' returned non-zero exit status 1.
warning: error(s) occurred while switching to the new configuration

I tried to fix it by using grub bootloader:

{ pkgs, ... }:
{
 # boot.loader.systemd-boot.enable = true;
  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.loader.grub.enable = true;
  boot.loader.grub.device = "/dev/sda";
  boot.loader.grub.useOSProber = true;
}

then switching configuration finished successfuly, however after reboot, very ordinary wayland login page showed up, password was accepted, screen went blank and then login page showed up again. And all over again.

This is my first experience with nixos, I would realy appretiate your help.

jburget avatar Apr 30 '24 10:04 jburget

have you copy the hardware-configuration.nix from /etc/nixos in your vm to the host in this flake you want to use

deng232 avatar May 09 '24 22:05 deng232

I have used the installation script. Also as far as I remember, git has shown that hardware-configuration.nix has been modified, so I gues it should be correct.

jburget avatar May 10 '24 08:05 jburget

sorry I didn't see you fixed the mounting point problem. For the second problem, “ctrl + alt + f4” to force into tty terminal. login from there and launch hyprland. the problem might be it using lightdm as displaymanager which got some problem. try using other display manager like sddm to avoid the issue

deng232 avatar May 12 '24 03:05 deng232

Hi :wave: I'm giving this repository a spin in a QEMU/KVM virtual machine as well (default settings) and bumped into the same issue. Switching to GRUB indeed fixes the first half of the issue because virt-manager defaults to BIOS firmware when you create the virtual machine for the first time and this repo assumes UEFI. Here are my discoveries and fix regarding the second half of this issue:

then switching configuration finished successfuly, however after reboot, very ordinary wayland login page showed up, password was accepted, screen went blank and then login page showed up again. And all over again.

This is actually because Hyprland crashes and exits over and over again booting you back to the login screen each time. I enabled logging, started Hyprland manually via TTY and noticed the following errors:

[render/egl.c:319] Software rendering detected, please use the WLR_RENDERER_ALLOW_SOFTWARE environment variable to proceed
 159   │ [render/egl.c:571] Failed to initialize EGL context
 160   │ [render/gles2/renderer.c:503] Could not initialize EGL
 161   │ [CRITICAL] m_sWLRRenderer was NULL! This usually means wlroots could not find a GPU or enountered some issues.
 162   │ [CRITICAL] Critical error thrown: wlr_gles2_renderer_create_with_drm_fd() failed!

Looking those up I found this issue https://github.com/hyprwm/Hyprland/issues/40 where people are saying 3D acceleration should be enabled. Enabling that in virt-manager resolved the issue on my end. The VM is incredibly slow but hey, at least it works :)

he problem might be it using lightdm as displaymanager which got some problem. try using other display manager like sddm to avoid the issue

I can confirm lightdm is not the issue. sddm might be a better choice over all though as they have experimental wayland support. But that's probably best discussed in another issue / discussion.

sleeyax avatar May 19 '24 19:05 sleeyax

Sorry, didn't mean to close it. The vm host created by @sleeyax in #15 should solve your issue though. If you try it let me know if it is working.

Also sorry for not responding to you issue, I've been pretty busy and also didn't know how to help you out.

Frost-Phoenix avatar May 19 '24 20:05 Frost-Phoenix

close because multiple months without activity.

Frost-Phoenix avatar Oct 04 '24 21:10 Frost-Phoenix