= KVM Installation = KVM, (kernel-based Virtual Machine) is a free and opensource virtualization platform for the Linux kernel. When installed on a Linux system, it becomes a Type-2 hypervisor. Here we look at how to install KVM on Ubuntu 20.04 LTS. First update the Ubuntu package repository. Before installing KVM on Ubuntu, we are first going to verify if the hardware supports KVM. A minimum requirement for installing KVM is the availability of CPU virtualization extensions such as AMD-V and Intel-VT. To check whether the Ubuntu system supports virtualization, run the following command. {{{ egrep -c '(vmx|svm)' /proc/cpuinfo }}} An outcome greater than 0 implies that virtualization is supported To check if your system supports KVM virtualization execute the command {{{ sudo apt install cpu-checker sudo kvm-ok }}} With the confirmation that our system can support KVM virtualization, we are going to install KVM, To install KVM, virt-manager, bridge-utils and other dependencies, run the command {{{ apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients virt-manager bridge-utils }}} Before proceeding further, we need to confirm that the virtualization daemon – libvritd-daemon – is running. To do so, execute the command {{{ sudo systemctl status libvirtd systemctl enable --now libvirtd }}} Check if KVM modules are loaded, {{{ lsmod | grep -i kvm }}} [[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/databaseandweb/web1.png)]] To view available Guest os variants, {{{ apt install libosinfo-bin osinfo-query os }}} = Creating a Virtual Machine = sudo virt-install --name perfsonar --os-variant centos7.0 --vcpus 4 --ram 16384 --cdrom /home/lg/downloads/pS-Toolkit-4.4.4-CentOS7-FullInstall-x86_64-2022Apr04.iso --network bridge=virbr0,model=virtio --graphics vnc,listen=0.0.0.0 --noautoconsole --disk size=100