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:36] – 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 | ||
| + | </ | ||
| - | add your users to groups **kvm**, **qemu** and **libvirt**. | + | ===== Networking configuration ===== |
| - | <code bash> | + | 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. |
| - | gpasswd -a < | + | |
| - | gpasswd -a <tuo_utente> kvm | + | This means, given the following example (in / |
| - | rc-update add libvirt-guests | + | <code> |
| - | rc-update add libvirtd | + | config_eno1=" |
| + | route_eno1=" | ||
| </ | </ | ||
| - | **/ | + | To this: |
| < | < | ||
| - | unix_sock_group | + | bridge_br0="eno1" |
| - | unix_sock_rw_perms | + | config_br0="10.0.0.50/ |
| + | route_br0=" | ||
| + | |||
| + | config_eno1=" | ||
| </ | </ | ||
| - | ===== Networking ===== | + | 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 | ||
| + | </ | ||
| - | bridge_br0=" | ||
| - | config_br0=" | ||
| - | bridge_br1=" | + | ===== Users configuration ===== |
| - | config_br1=" | + | |
| - | 547 ln -s net.lo net.br0 | + | add your users to groups **kvm**, **qemu** and **libvirt**. |
| - | | + | |
| - | | + | <code bash> |
| - | | + | gpasswd |
| - | | + | gpasswd -a user kvm |
| - | | + | gpasswd -a user qemu |
| + | rc-update add libvirt-guests | ||
| + | rc-update add libvirtd | ||
| + | /etc/init.d/libvirtd start | ||
| + | / | ||
| + | </ | ||