[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:emulators:libvirt_config_methods [2022/02/18 19:18 (UTC)] – [Libvirt config, settings and method for Slackware] zeebra | howtos:emulators:libvirt_config_methods [2023/12/01 12:04 (UTC)] (current) – [Libvirt config, settings and method for Slackware] zeebra | ||
---|---|---|---|
Line 21: | Line 21: | ||
</ | </ | ||
Note. You need to log out of X and TTY and back in for group to take effect.\\ | Note. You need to log out of X and TTY and back in for group to take effect.\\ | ||
- | Go to the libvirt config file and uncomment the relevant options and set them correctly. Then start the libvirt daemons. | + | Go to the libvirt config file and uncomment the relevant options and set them as you prefer. Then start the libvirt daemons. |
< | < | ||
(as ROOT) | (as ROOT) | ||
Line 44: | Line 44: | ||
*run qemu: | *run qemu: | ||
*start libvirt daemons as root | *start libvirt daemons as root | ||
- | *start libvirt daemons | + | *start libvirt daemons |
- | *to use qemu/kvm through virt-manager. | + | *to use qemu/kvm through virt-manager |
Personally I only really care about running qemu: | Personally I only really care about running qemu: | ||
- | === libvirt.conf === | + | === libvirtd.conf === |
- | go to the libvirt config file and uncomment the relevant options and set them correctly. | + | go to the libvirt config file and uncomment the relevant options and set them as you prefer. |
< | < | ||
nano / | nano / | ||
Line 61: | Line 61: | ||
The above are internal libvirt settings, while polkit regulates who can use libvirt (sockets) through a GUI like virt-manager for example.\\ | The above are internal libvirt settings, while polkit regulates who can use libvirt (sockets) through a GUI like virt-manager for example.\\ | ||
- | This is ok for a PC with one user where you are the only one in the libvirt group, but you might want to consider less and more strict settings and a different polkit policy. | + | This is ok for a PC with one user where you are the only one in the libvirt group, but you might want to consider less and more strict settings and a different polkit policy. If you plan to also use LXC or other containers (with libvirt/ |
=== Polkit === | === Polkit === | ||
Line 98: | Line 98: | ||
=== kvm === | === kvm === | ||
- | Running libvirt daemons and qemu: | + | Running libvirt daemons |
- | The most " | + | The most common |
+ | |||
+ | === /dev/dri === | ||
+ | |||
+ | The same that applies to kvm also applies to video cards. To solve this, you ONLY need to add the " | ||
+ | < | ||
+ | You need to log out of X/wayland and tty, and back in, with your user for this change to take effect. | ||
=== /etc/rc.d === | === /etc/rc.d === | ||
- | Content will be added here | + | To start libvirtd and virtlogd on boot (as root), you can add them to / |
+ | < | ||
+ | / | ||
+ | / | ||
+ | </ | ||
=== udev === | === udev === | ||
- | Content will be added here | + | To change /dev/kvm group and permissions on boot, add a file / |
+ | < | ||
+ | # / | ||
+ | # | ||
+ | # Udev rule to override kvm group and permissions: | ||
+ | # To allow kvm group read/write access to /dev/kvm | ||
+ | # | ||
+ | # Set kvm device writable by kvm group | ||
+ | KERNEL==" | ||
+ | </ | ||
+ | |||
+ | Once you reboot you can verify the changes: | ||
+ | < | ||
+ | ls -la /dev/kvm | ||
+ | crw-rw---- root kvm | ||
+ | </ | ||
=== Appendage === | === Appendage === | ||
Line 120: | Line 145: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
- | {{tag> | + | {{tag> |