User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gentoo:kvm-qemu [2026/03/24 07:04] willygentoo: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/libvirt app-emulation/virt-manager qemu -vp+emerge net-misc/bridge-utils app-emulation/libvirt app-emulation/virt-manager qemu -vp
 </code> </code>
  
-===== ... =====+And make sure your libvirtd has proper access configuration for the sockets: 
 +**/etc/libvirt/libvirtd.conf**: 
 +<code> 
 +unix_sock_group "libvirt" 
 +unix_sock_rw_perms "0770" 
 +</code> 
 + 
 +===== 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): 
 +<code> 
 +config_eno1="10.0.0.50/24" 
 +route_eno1="default via 10.0.0.1" 
 +</code> 
 + 
 +To this: 
 +<code> 
 +bridge_br0="eno1" 
 +config_br0="10.0.0.50/24" 
 +route_br0="default via 10.0.0.1" 
 + 
 +config_eno1="null" 
 +</code> 
 + 
 +And add the required init links: 
 +<code bash> 
 +cd /etc/init.d 
 +ln -s net.lo net.br0 
 +rc-update add net.br0 default 
 +rc-update del net.eno1 default 
 +./net.eno1 stop 
 +./net.br0 start 
 +</code> 
 + 
 + 
 +===== Users configuration ===== 
 + 
 +add your users to groups **kvm**, **qemu** and **libvirt**. 
 + 
 +<code bash> 
 +gpasswd -a user libvirt 
 +gpasswd -a user kvm 
 +gpasswd -a user qemu 
 +rc-update add libvirt-guests 
 +rc-update add libvirtd 
 +/etc/init.d/libvirtd start 
 +/etc/init.d/libvirt-guests start 
 +</code>