User:Egberts/Drafts/Virt-manager

The virt-manager application is a Article description::desktop user interface for managing virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers). It presents a summary view of running domains, their live performance & resource utilization statistics. Wizards enable the creation of new domains, and configuration & adjustment of a domain’s resource allocation & virtual hardware. An embedded VNC and SPICE client viewer presents a full graphical console to the guest domain [//virt-manager.org].

Kernel
The following kernel config is recommended by the libvirt installer (source?).

User Permissions
After emerging, to run virt-manager as a normal user, ensure each user has been added to the group:

Uncomment the following lines from the libvirtd configuration file:

Be sure to have the user log out then log in again for the new group settings to be applied.

Issue the following command to restart the libvirtd service under OpenRC:

Issue the following command to restart the libvirtd service under systemd:

should now be launchable as a regular user.

Files

 * - Global (system wide) configuration file.

USE flags
Some packages are aware of the USE flag.

Review the possible USE flags for QEMU:

USE_EXPAND
Additional ebuild configuration frobs are provided as the USE_EXPAND variables QEMU_USER_TARGETS and QEMU_SOFTMMU_TARGETS. See for a list of all the available targets (there are a heck of a lot of them; most of them are very obscure and may be ignored; leaving these variables at their default values will disable almost everything which is probably just fine for most users).

For each target specified, a qemu executable will be built. A  target is the standard qemu use-case of emulating an entire system (like VirtualBox or VMWare, but with optional support for emulating CPU hardware along with peripherals). targets execute user-mode code only; the (somewhat shockingly ambitious) purpose of these targets is to "magically" allow importing user-space linux ELF binaries from a different architecture into the native system (that is, they are like multilib, without the awkward need for a software stack or CPU capable of running it).

In order to enable QEMU_USER_TARGETS and QEMU_SOFTMMU_TARGETS we can edit the variables globally in, i.e.:

Or, the file(s) can be modified. Two equivalent syntaxes are available: traditional USE flag syntax, i.e.:

Another alternative is to use the newer sexy USE_EXPAND -specific syntax:

Install QEMU host
After reviewing and adding any desired USE flags, emerge :

Reboot the host.

Verify QEMU host
To verify that the host hardware has the needed virtualization support, issue the following command:

The vmx or svm CPU flag should be red highlighted and available.

File must exist.

Checking networking
Network interfaces for virt-manager can be checked by running