Step by Step
Step 1: Check if virtualization is enabled
command 1
|
|
command 2
|
|
VT-xfor IntelAMD-Vifor AMD
ensure that your kernel includes KVM modules
|
|
- y = Yes (always installed)
- m = Loadable module
Step 2: Install the required KVM packages
|
|
- qemu-full - user-space KVM emulator, manages communication between hosts and VMs
- qemu-img - provides create, convert, modify, and snapshot, offline disk images
- libvirt - an open-source API, daemon, and tool for managing platform virtualization
- virt-install - CLI tool to create guest VMs
- virt-manager - GUI tool to create and manage guest VMs
- virt-viewer - GUI console to connect to running VMs
- edk2-ovmf - enables UEFI support for VMs
- dnsmasq - lightweight DNS forwarder and DHCP server
- swtpm - TPM (Trusted Platform Module) emulator for VMs
- guestfs-tools - provides a set of extended CLI tools for managing VMs
- libosinfo - a library for managing OS information for virtualization.
- tuned - system tuning service for linux allows us to optimise the hypervisor for speed.
Enable and start libvirt daemon
|
|
Troubleshooting
No internet in guest os
You need to set firewall_backend = "iptables" in /etc/libvirt/network.conf
Then restart the service:
|
|
Error Operation not supported: Cannot use direct socket mode if no URI is set
solution
|
|
source: https://libvirt.org/kbase/failed_connection_after_install.html
Error Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
run
|
|
then
|
|