Version 1 (modified by 2 years ago) ( diff ) | ,
---|
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
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
Attachments (15)
- kvm1.png (6.4 KB ) - added by 2 years ago.
- kvm2.png (7.1 KB ) - added by 2 years ago.
- kvm5.png (36.6 KB ) - added by 2 years ago.
- kvm6.png (102.2 KB ) - added by 2 years ago.
- kvm7.png (98.3 KB ) - added by 2 years ago.
- kvm8.png (90.1 KB ) - added by 2 years ago.
- kvm9.png (86.9 KB ) - added by 2 years ago.
- kvm10.png (103.2 KB ) - added by 2 years ago.
- kvm11.png (73.0 KB ) - added by 2 years ago.
- kvm12.png (93.0 KB ) - added by 2 years ago.
- kvm13.png (105.1 KB ) - added by 2 years ago.
- kvm14.png (112.5 KB ) - added by 2 years ago.
- kvm15.png (103.6 KB ) - added by 2 years ago.
- kvm16.png (140.4 KB ) - added by 2 years ago.
- kvm17.png (150.7 KB ) - added by 2 years ago.
Download all attachments as: .zip