You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the virtio_video is true then I get a systemd error when running nixos-rebuild switch --flake .
warning: the following units failed: nixvirt.service
× nixvirt.service - Configure libvirt objects
Loaded: loaded (/etc/systemd/system/nixvirt.service; enabled; preset: ignored)
Active: failed (Result: exit-code) since Thu 2025-02-13 15:16:39 CET; 301ms ago
Invocation: 483d7cf7a777445e96817f1003510f76
Process: 11611 ExecStart=/nix/store/5hdm2larimdp9b2i4ccbj22rmrpk6kva-unit-script-nixvirt-start/bin/nixvirt-start (code=exited, status=1/FAILURE)
Main PID: 11611 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
IO: 8K read, 0B written
Mem peak: 19M
CPU: 206ms
Feb 13 15:16:38 srv1 nixvirt-start[11612]: [delete, /domain/devices/video/model[2]]
Feb 13 15:16:38 srv1 nixvirt-start[11612]: domain 35ccc185-f1c6-453e-aa1f-c10624e075ce: deactivate
Feb 13 15:16:39 srv1 nixvirt-start[11612]: Defining pool volumes
Feb 13 15:16:39 srv1 nixvirt-start[11612]: Setting activation state
Feb 13 15:16:39 srv1 nixvirt-start[11612]: domain 35ccc185-f1c6-453e-aa1f-c10624e075ce: activate
Feb 13 15:16:39 srv1 nixvirt-start[11612]: NixVirt: libvirt error: internal error: process exited while connecting to monitor: 2025-02-13T14:16:39.355240Z qemu-system-x86_64: egl: eglGetDisplay failed: EGL_SUCCESS
Feb 13 15:16:39 srv1 nixvirt-start[11612]: 2025-02-13T14:16:39.356055Z qemu-system-x86_64: egl: render node init failed
Feb 13 15:16:39 srv1 systemd[1]: nixvirt.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 15:16:39 srv1 systemd[1]: nixvirt.service: Failed with result 'exit-code'.
Feb 13 15:16:39 srv1 systemd[1]: Failed to start Configure libvirt objects.
warning: error(s) occurred while switching to the new configuration
I think the problem is that I didn't install xorg or wayland. And i also shouldn't depend on this to run libvirt.
So. I change virtio_video to false and then it installs without errors.
If i run virsh list I can see that the vm is running. But I cannot access it.
I tried to virsh console vm1 but I get the error
error: internal error: cannot find character device <null>
I tried to setup VNC graphics, but it didn't seem to have any effect.
devices = {
graphics = {
type = "vnc";
port = "-1";
autoport = "yes";
listen = {
type = "adress";
address = "0.0.0.0";
};
};
};
I also tried to SSH into the VM. but I could not find the IP of the VM.
I tried with NMAP but I don't think it got any IP from the DHCP server.
ip -br a
...
virbr0 UP 192.168.71.1/24
...
martin@srv1:~/ > nmap -sn '192.168.71.*'
Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-13 15:36 CET
Nmap scan report for 192.168.71.1
Host is up (0.00082s latency).
Nmap done: 256 IP addresses (1 host up) scanned in 2.81 seconds
I also have a copy from the output of virsh edit --domain vm1
I am trying to setup VM's on some headless servers.
I am using a qcow2 file that I generated from another nixos configuration, but I also tested this with the latest qcow2 file from debian.
My flake.nix file is here:
If the virtio_video is
true
then I get a systemd error when runningnixos-rebuild switch --flake .
I think the problem is that I didn't install xorg or wayland. And i also shouldn't depend on this to run libvirt.
So. I change virtio_video to false and then it installs without errors.
If i run
virsh list
I can see that the vm is running. But I cannot access it.I tried to
virsh console vm1
but I get the errorI tried to setup VNC graphics, but it didn't seem to have any effect.
I also tried to SSH into the VM. but I could not find the IP of the VM.
I tried with NMAP but I don't think it got any IP from the DHCP server.
I also have a copy from the output of
virsh edit --domain vm1
The text was updated successfully, but these errors were encountered: