[2025-jun-17] The SlackDocs mailing lists at https://lists.alienbase.nl/mailman/listinfo have been retired. No one has been using these lists for years and it's time to say goodbye. The list archives remain available at https://scalzi.slackware.nl/mailman/listinfo/slackdocs
[2025-jun-17] The SlackDocs Wiki has moved to a new server, in order to make it more performant.
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:emulators:libvirt_config_methods [2022/02/18 19:11 (UTC)] – created 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 === | ||
+ | |||
+ | To start libvirtd and virtlogd on boot (as root), you can add them to / | ||
+ | < | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | === udev === | ||
+ | |||
+ | 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 112: | 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> |