2024年04月07日

QEMU

Soooooooooooooooo, I got Virt-Manager working from the issue I have on this day.

Turns out, if you use virtualisation.libvirtd.qemu.runAsRoot = false;, libvirtd will use qemu-libvirtd as a group. Hence, it’s required to add a group for it.

Then fix the file permission path.

setfacl -m u:qemu-libvirtd:rx ~

This was the previous permissions.

$ getfacl -e ~
# file: .
# owner: birb
# group: users
user::rwx
user:qemu-libvirtd:--x		#effective:---
group::---			          #effective:---
mask::---
other::---

With the permission fix, it becomes this.

# file: .
# owner: birb
# group: users
user::rwx
user:qemu-libvirtd:r-x		#effective:r-x
group::---			          #effective:---
mask::r-x
other::---

I will try removing the `qemu-libvirtd` group in my configuration.

Update:

Removing the group doesn’t affect the permissions so it’s not needed. What’s important is, however, is to keep setting the permissions with setfacl when rebuild switch happens.

Meddlesome, but it’s not something that NixOS can’t do.

Someone here pointed out that everytime a rebuild switch is made, it removes the permissions to read and write.

However, the issue with cursor gdk fonts can only be solved by exporting GDK_BACKEND=x11 when running virt-manager.