Related work:
I’m not sure anyone has reached a resolution yet. So here it goes for 2020:
I’m trying to run NixOS as a guest OS inside of KVM, I’ve set it up through virt-manager, and after downloading the nixos graphical installation iso from NixOS - Getting Nix / NixOS here I asked virt-manager to boot it and installed it on the VM using the directions from NixOS - NixOS 21.05 manual. virt-manager was about to recognize my os as nixos-20.03 and seemed to have a default profile for it.
I modified my configuration.nix file to include gnome shell, and add qemuGuest and spice-vdagentd.
The additions I added look like:
services.xserver.videoDrivers = [ "qxl" ];
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
services.dbus.packages = with pkgs; [ gnome2.GConf ];
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = mkSure true;
systemctl status reports that qemu-guest-agent.service is running, but spice-vdagent has some errors:
● spice-vdagentd.service - spice-vdagent daemon
Loaded: loaded (/nix/store/fn4bc6avww5vzx4lyvs913gpmm5qd1y0-unit-spice-vdagentd.service/spice-vdagentd.service; enabled; vendor preset>
Active: active (running) since Tue 2020-07-14 17:16:40 BST; 1min 18s ago
Process: 683 ExecStartPre=/nix/store/c4vnsvk19p5kmmgqhn1h4nx3f276a2x8-unit-script-spice-vdagentd-pre-start (code=exited, status=0/SUCCE>
Process: 697 ExecStart=/nix/store/s4gp0qjx75mg8n25dd7798l8lx3b85ka-spice-vdagent-0.19.0/bin/spice-vdagentd (code=exited, status=0/SUCCE>
Main PID: 700 (spice-vdagentd)
IP: 0B in, 0B out
Tasks: 1 (limit: 4915)
Memory: 1.5M
CPU: 12ms
CGroup: /system.slice/spice-vdagentd.service
└─700 /nix/store/s4gp0qjx75mg8n25dd7798l8lx3b85ka-spice-vdagent-0.19.0/bin/spice-vdagentd
Jul 14 17:16:40 emurgo systemd[1]: Starting spice-vdagent daemon...
Jul 14 17:16:40 emurgo systemd[1]: Started spice-vdagent daemon.
Jul 14 17:16:41 emurgo spice-vdagentd[700]: Error getting active session: No data available
Jul 14 17:16:41 emurgo spice-vdagentd[700]: Error getting active session: No data available
Jul 14 17:16:41 emurgo spice-vdagentd[700]: Error getting active session: No data available
Jul 14 17:16:41 emurgo spice-vdagentd[700]: Error getting active session: No data available
Jul 14 17:17:26 emurgo spice-vdagentd[700]: Error getting session for pid 1490: No data available
virt-manager also reports that there is a “qemu-ga” channel that’s “connected”. I don’t know what that means. Nevertheless, copy-and-paste between the guest and host OS does not work, and virt-manager reports that “guest agent is not available” when I go to select the auto display scaling option.
Any ideas?