User:Egberts/Drafts/QEMU

QEMU (Quick EMUlator) is Article description::a generic, open source hardware emulator and virtualization suite.

QEMU is a [Type-2 hypervisor] that runs within user space and performs virtual hardware emulation.

QEMU when used in conjunction with an accelerator becomes a Type-1 hypervisor that runs in kernel space, that allows a user space program access to the hardware virtualization features of various processors. Such accelerator can be KVM (Kernel-based Virtual Machine) or Xen.

If no accelerator is used, QEMU will run entirely in user-space using its built in binary translator TCG (Tiny Code Generator). Using QEMU without an accelerator is relatively inefficient and slow.

System User/Group
User name qemu is required; Defined by ; evoked by package.

Group name qemu is requried. Defined by ; evoked by package.

Control groups
TBS

POSIX file capabilities
TNS

Host setup
This section details the fastest paravirtualization (QEMU/KVM) setup for a host that has been installed with Gentoo OS on either x86_64, amd64, or mips CPU hardware platform.

BIOS and UEFI firmware
In order to utilize KVM either Vt-x (vmx) or AMD-V (svm) must be supported by the host processor. Vt-x or AMD-V are Intel and AMD's respective technologies for permitting multiple operating systems to concurrently execute operations on the host processors.

To inspect host hardware for virtualization support, issue the following command:

If KVM support is available, there should be a "kvm" device listed under. This will take effect after the system has booted to a KVM-enabled kernel.

Kernel
Described below are the basic requirements for KVM kernel configuration for the host OS. A more complete and up-to-date list can be found at the [//www.linux-kvm.org/page/Tuning_Kernel KVM Tuning Kernel] page.

Physical CPU Processor Support - Host
If KVM support is not available, insert CONFIG_KVM=y into the and rebuild/reinstall the kernel (and its initramfs image). Come back here after the host gets rebooted.

For the QEMU host, choose one of the two CPU architectures found on its hardware platform:

or

Since we are building the KVM into the kernel (and not as a module), only choose one CPU architecture: Intel or AMD.

Virtual CPU Processor Support - Guest(s)
For a list of supporting CPUs that the guest platform(s) on this host should support, consult the [QEMU use flags] and insert desire target(s) into the USE= string in the portage configuration  file.

Handling Kernel Config at CLI
To set the various kernel configuration settings from the command lines, the shall be used here:

Mandatory kernel configuration options to set:

Useful kernel configuration options to use:

Accelerated networking, required for  USE flag (recommend):

Needed for 802.1d Ethernet bridging:

Intel VT-g (integrated graphics adapter virtualization)
Mediated device passthrough for Intel GPUs (Broadwell and newer) [//forums.gentoo.org/viewtopic-p-8157704.html].