Closed Janik-Haag closed 1 year ago
Okay I'm sorry i bothered you it was just me being dumb. For some reason virt-manager throws the before mentioned errors when not having a gtk-cursor theme installed. For anyone finding this issue in the future when using home-manager set:
home.pointerCursor.gtk.enable = true;
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/virt-manager-cannot-create-vm/38894/2
Describe the bug
Virt-Manager throws an error when trying to create a vm, and does not create the vm
Steps To Reproduce
Steps to reproduce the behavior:
Use sway default.nix
home.nix
{ imports = [ ../../programs/waybar.nix ]; wayland.windowManager.sway = { enable = true; config = rec { modifier = "Mod4"; input = { "type:keyboard" = { xkb_layout = "us,de"; }; "type:touchpad" = { tap = "enabled";
dwt = "enabled";
}; }; menu = "rofi -show drun -show-icons"; terminal = "alacritty"; startup = [ {command = "nm-applet --indicator";}
{command = "bluemann-applet";}
Switch to Workspace
Move Focus
"${modifier}+Shift+r" = "reload"; "${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
Exec Programms
"${modifier}+Return" = "exec alacritty"; "${modifier}+d" = "exec rofi -show drun -show-icons"; "${modifier}+Shift+d" = "exec swaymsg input \"1:1:AT_Translated_Set_2_keyboard\" xkb_switch_layout next"; "${modifier}+Shift+o" = "exec swaylock --screenshots --clock --effect-blur 7x5 --fade-in 0.5 --indicator --indicator-radius 100 --indicator-thickness 5 --effect-vignette 0.5:0.5 --ring-color bd93f9 --key-hl-color 50fa7b --line-color 00000000 -e --text-color ff79c6 -K"; "${modifier}+Shift+s" = "exec \"flameshot gui -c\"";
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +10%"; "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -10%"; "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+"; "XF86MonBrightnessDown" = "exec brightnessctl set 10%-"; }; }; extraSessionCommands = '' export XDG_SESSION_TYPE=wayland export XDG_SESSION_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway export SDL_VIDEODRIVER=wayland export _JAVA_AWT_WM_NONREPARENTING=1 export QT_QPA_PLATFORM=wayland ''; };
}
{ config, pkgs, user, ... }:
{ boot.extraModprobeConfig = '' options kvm_intel nested=1 ''; users.groups.libvirtd.members = [ "root" "${user}" ]; virtualisation = { libvirtd = { enable = true; qemu = { verbatimConfig = '' nvram = [ "${pkgs.OVMF}/FV/OVMF.fd:${pkgs.OVMF}/FV/OVMF_VARS.fd" ] ''; }; }; spiceUSBRedirection.enable = true; }; environment = { systemPackages = with pkgs; [ virt-manager qemu OVMF ]; }; }
Error launching details: 'NoneType' object has no attribute 'conn'
Traceback (most recent call last): File "/nix/store/bjkzfis4wgh729sh16pr782rkw424nax-virt-manager-4.1.0/share/virt-manager/virtManager/vmwindow.py", line 36, in get_instance key = "%s+%s" % (vm.conn.get_uri(), vm.get_uuid()) AttributeError: 'NoneType' object has no attribute 'conn'
Error starting installation: constructor returned NULL
Traceback (most recent call last): File "/nix/store/bjkzfis4wgh729sh16pr782rkw424nax-virt-manager-4.1.0/share/virt-manager/virtManager/createvm.py", line 1881, in _finish_clicked self._start_install(guest, installer) File "/nix/store/bjkzfis4wgh729sh16pr782rkw424nax-virt-manager-4.1.0/share/virt-manager/virtManager/createvm.py", line 1978, in _start_install progWin.run() File "/nix/store/bjkzfis4wgh729sh16pr782rkw424nax-virt-manager-4.1.0/share/virt-manager/virtManager/asyncjob.py", line 270, in run Gdk.Cursor.new_from_name(gdk_window.get_display(), "progress")) TypeError: constructor returned NULL
Janik@nixos: nix-shell -p nix-info --run "nix-info -m" this path will be fetched (0.00 MiB download, 0.00 MiB unpacked): /nix/store/a2mfyh90szmc055ivfnv182b5a4naq90-nix-info copying path '/nix/store/a2mfyh90szmc055ivfnv182b5a4naq90-nix-info' from 'https://cache.nixos.org'...
"x86_64-linux"
Linux 5.15.83, NixOS, 23.05 (Stoat), 23.05.20221218.04f574a
yes
yes
nix-env (Nix) 2.12.0
/nix/var/nix/profiles/per-user/root/channels/nixos