linux:apps:kvm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:apps:kvm [2023/08/06 09:25] – [Configuration] oscar | linux:apps:kvm [2026/10/01 05:46] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== KVM ====== | ||
| - | |||
| - | ===== Installation ===== | ||
| - | Install all the required for the installation of Qemu, KVM hypervisor, and Libvirt | ||
| - | # apt install qemu-system libvirt-daemon-system qemu-utils virt-manager | ||
| - | |||
| - | * qemu-system: | ||
| - | * virt-manager: | ||
| - | * libvirt-daemon-system: | ||
| - | * qemu-utils: Various utilities e.g. for manipulating disk images | ||
| - | * virtinst: Allows to create Virtual Machines (VMs) from the command-line. | ||
| - | |||
| - | Verify that the virtualization daemon, libvritd-daemon, | ||
| - | < | ||
| - | # systemctl status libvirtd | ||
| - | |||
| - | Output: | ||
| - | |||
| - | ● libvirtd.service - Virtualization daemon | ||
| - | | ||
| - | | ||
| - | TriggeredBy: | ||
| - | ● libvirtd-admin.socket | ||
| - | ● libvirtd.socket | ||
| - | Docs: man: | ||
| - | | ||
| - | Main PID: 7999 (libvirtd) | ||
| - | Tasks: 19 (limit: 32768) | ||
| - | | ||
| - | CPU: 188ms | ||
| - | | ||
| - | | ||
| - | Aug 06 10:57:02 pcwerkkamer systemd[1]: Starting libvirtd.service - Virtualization daemon... | ||
| - | Aug 06 10:57:02 pcwerkkamer systemd[1]: Started libvirtd.service - Virtualization daemon. | ||
| - | </ | ||
| - | Check if libvirtd service will start automatically at boot time. | ||
| - | < | ||
| - | # systemctl is-enabled libvirtd | ||
| - | |||
| - | Output: | ||
| - | enabled | ||
| - | </ | ||
| - | If disabled run the following command to have it boot automatically: | ||
| - | # systemctl enable --now libvirtd | ||
| - | |||
| - | Use the following command to determine whether the KVM modules are loaded: | ||
| - | < | ||
| - | $ lsmod | grep -i kvm | ||
| - | kvm_intel | ||
| - | kvm 1142784 | ||
| - | irqbypass | ||
| - | </ | ||
| - | ===== Configuration ===== | ||
| - | === User priviliges === | ||
| - | In order to manage virtual machines as a regular user, that user needs to be added to the libvirt group: | ||
| - | |||
| - | # usermod -aG libvirt,kvm USERNAME | ||
| - | |||
| - | === User-specific and system-wide VMs === | ||
| - | By default, if virsh is run as a normal user it will connect to libvirt using qemu:/// | ||
| - | |||
| - | $ virsh --connect qemu:/// | ||
| - | |||
| - | To avoid having to use the --connect flag on every command, the URI string can be set in the LIBVIRT_DEFAULT_URI environment variable: | ||
| - | |||
| - | $ export LIBVIRT_DEFAULT_URI=' | ||
| - | |||
linux/apps/kvm.1691313947.txt.gz · Last modified: by oscar
