KVM by Jean-Christophe Manciot is licensed under a GPLv3 License.
Table of Contents
Preliminary Checks
First off, you should make the following checks:
- your system must be compatible:
sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
- Then the following will give you the number of vCPUs available on your system:
sudo egrep -c '(vmx|svm)' /proc/cpuinfo
8
(for instance)
- If you intend to use nested acceleration (KVM in KVM VM):
sudo cat /sys/module/kvm_intel/parameters/nested
Y
KVM Packages
The following packages are necessary tu run KVM and its manager, along with some Optional guest VM tools.
- edk2: UEFI firmware for 64-bit x86 virtual machines. The source code comes from the official Debian repository.
- libosinfo: Library for managing information about operating systems and hypervisors. The source code comes from the official Debian repository.
- osinfo-db: osinfo-db provides the database files for use with the libosinfo library. The source code comes from the official Debian repository.
- osinfo-db-tools: This package contains a set of tools to assist administrators and developers in managing the osinfo-db database. The source code comes from the official Debian repository.
- qemu: Generic and open source machine emulator and KVM Hypervisor. The source code comes from the official Debian repository.
- It might be necessary to change the permissions of the qemu binaries with:
chown -v root:libvirt-qemu /usr/bin/kvm /usr/bin/qemu\*
- seabios: SeaBIOS is an open source implementation of a 16bit X86 BIOS. SeaBIOS can run in an emulator or it can run natively on X86 hardware with the use of coreboot. SeaBIOS is the default BIOS for qemu and kvm. The source code comes from the official Debian repository.
1) libsys-virt-perl: [Optional] Libvirt Perl bindings. The source code comes from the official Debian repository.
2) libvirt: Library for interfacing with hypervisors such as KVM/Qemu - VirtualBox - VMware - ESX - OpenVZ - LXC... The source code comes from the official Debian repository.
- It is necessary to configure the security driver in /etc/libvirt/qemu.conf as one of the following drivers:
- none
- apparmor
- selinux
- In the case where Apparmor has not been chosen, it might also be necessary to disable Libvirt Apparmor profiles with:
ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
aa-status | grep -i libvirt
3) libvirt-glib: Mapping of the libvirt API and XML to GLib/GObject. The source code comes from the official Debian repository.
4) libvirt-python: Libvirt Python bindings. The source code comes from the official Debian repository.
5) ocaml-libvirt: [Optional] Libvirt OCAML bindings. The source code comes from the official Debian repository.
- libguestfs: [Optional] A set of tools for accessing and modifying virtual machine (VM) disk images. The source code comes from the official upstream repository and from the official Debian repository.
- spice: Spice server. The source code comes from the official Debian repository.
- spice-gtk: A GTK client and libraries for SPICE remote desktop servers. The source code comes from the official Debian repository.
- spice-protocol: [Optional] Used only for building some Spice packages. The source code comes from the official Debian repository.
- spice-vdagent: [Optional] Spice agent server and client. The source code comes from the official Debian repository.
- virt-manager: VM Manager. The source code comes from the official upstream repository and the official Debian repository.
- virt-viewer: VM Graphical Display. The source code comes from the official Debian repository.
Virtual Machine Manager Screenshots
Main Menu
Virtual Networks Settings
Virtual Storage Settings
Virtual Machine Settings
Notes
- all technical details about KVM (Kernel Virtual Machine) are available here.
- to get the best performances, I recommend to adjust the CPU settings of your VMs in VM Manager to either "Copy host CPU configuration" or "host-passthrough".
- If you encounter some incompatibilities, you may need to disable Network Manager:
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
- Configure your /etc/network/interfaces with auto interface-name & iface interface-name inet(6) dhcp|auto|static statements; cf. for example http://unix.stackexchange.com/questions/128439/good-detailed-explanation-of-etc-network-interfaces-syntax
sudo systemctl stop ifup-wait-all-auto
sudo systemctl disable ifup-wait-all-auto
sudo systemctl mask ifup-wait-all-auto
otherwise you won't be able to boot if a single interface does not come up.