Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gentoo:kvm-qemu [2026/03/24 08:15] – willy | gentoo:kvm-qemu [2026/03/24 10:43] (current) – [Kernel and required packages] willy | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| Now, as for packages, you will want the VirtManager GUI and the QEMU package, so install the following: | Now, as for packages, you will want the VirtManager GUI and the QEMU package, so install the following: | ||
| <code bash> | <code bash> | ||
| - | emerge app-emulation/ | + | emerge |
| </ | </ | ||
| - | ===== ... ===== | + | And make sure your libvirtd has proper access configuration for the sockets: |
| + | **/ | ||
| + | < | ||
| + | unix_sock_group | ||
| + | unix_sock_rw_perms | ||
| + | </ | ||
| + | |||
| + | ===== Networking configuration ===== | ||
| + | |||
| + | If you want to use **bridged** networking, which means assign local LAN IP to your virtual machines, you need to convert your LAN interfaces to bridged. | ||
| + | |||
| + | This means, given the following example (in /etc/conf.d/net): | ||
| + | < | ||
| + | config_eno1=" | ||
| + | route_eno1=" | ||
| + | </ | ||
| + | |||
| + | To this: | ||
| + | < | ||
| + | bridge_br0=" | ||
| + | config_br0=" | ||
| + | route_br0=" | ||
| + | |||
| + | config_eno1=" | ||
| + | </ | ||
| + | |||
| + | And add the required init links: | ||
| + | <code bash> | ||
| + | cd / | ||
| + | ln -s net.lo net.br0 | ||
| + | rc-update add net.br0 default | ||
| + | rc-update del net.eno1 default | ||
| + | ./net.eno1 stop | ||
| + | ./net.br0 start | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Users configuration | ||
| add your users to groups **kvm**, **qemu** and **libvirt**. | add your users to groups **kvm**, **qemu** and **libvirt**. | ||
| <code bash> | <code bash> | ||
| - | gpasswd -a < | + | gpasswd -a user libvirt |
| - | gpasswd -a < | + | gpasswd -a user kvm |
| + | gpasswd -a user qemu | ||
| rc-update add libvirt-guests | rc-update add libvirt-guests | ||
| rc-update add libvirtd | rc-update add libvirtd | ||
| + | / | ||
| + | / | ||
| </ | </ | ||
| - | **/ | ||
| - | < | ||
| - | unix_sock_group = " | ||
| - | unix_sock_rw_perms = " | ||
| - | </ | ||