From c1e968639bda1e26a2b77fa98545c451ba0ba475 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Tue, 28 Jan 2025 14:22:17 +0530 Subject: [PATCH] Added steps to install kvm --- .../Assignment-2/Steps to install KVM.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Practical/Assignment-2/Steps to install KVM.md diff --git a/Practical/Assignment-2/Steps to install KVM.md b/Practical/Assignment-2/Steps to install KVM.md new file mode 100644 index 0000000..79050f6 --- /dev/null +++ b/Practical/Assignment-2/Steps to install KVM.md @@ -0,0 +1,49 @@ +# Steps to install KVM + +--- + +1. Check if virtualization is enabled. + +```shell +cat /proc/cpuinfo | grep -Ec '(vmx|svm)' +``` + +In this command, we are printing the contents of `/proc/cpuinfo`, then using grep for pattern matching. `vmx` is the name for Intel's virtualization and `svm` is AMD's. If the output is 0, virtualization is disabled in BIOS, otherwise it's on. + +2. Check if KVM virtualization is enabled. + +```shell +sudo apt install -y cpu-checker +kvm-ok +``` + +3. Install required packages + +```shell +sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients +``` + +- qemu-kvm – An opensource emulator and virtualization package that provides hardware emulation. +- virt-manager – A Qt-based graphical interface for managing virtual machines via the libvirt daemon. +- libvirt-daemon-system – A package that provides configuration files required to run the libvirt daemon. +- virtinst – A set of command-line utilities for provisioning and modifying virtual machines. +- libvirt-clients – A set of client-side libraries and APIs for managing and controlling virtual machines & hypervisors from the command line. + +4. Start and enable virtualization daemon + +```shell +sudo systemctl enable libvirtd +sudo systemctl start libvirtd +sudo systemctl status libvirtd +``` + +5. Add user to KVM and libvirt group + +```shell +sudo usermod -aG kvm $USER +sudo usermod -aG libvirt $USER +``` + +6. Launch KVM Virtual Machine Manager from App Launcher. + +7.