Posts

Showing posts with the label kvm

How to install KVM on Ubuntu Server 20.04 LTS ?

Image
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko. Run the below command to check whether the system supports virtualization:     # egrep -c  '(vmx|svm)' /proc/cpuinfo       16 If the above count is non zero, that indicates that system supports virtualization. Install 'cpu-checker' to make sure that your system is supported for KVM based virtualization.     # apt-get install cpu-checker -y Install all required package to configure KVM:     # apt-get install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager qemu-kvm: A software that provides hardware emulation for the kvm hypervisor. libvirt-daemon: A virtualization daemon that manages the lifecycle o...

How to configure Linux KVM bridge on Ubuntu 18.04 & 20.04 LTS ?

Image
1. Install all the required KVM packages:    # apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager   -y 2. Start and enable 'libvirtd' daemon:    # systemctl start libvirtd     # systemctl enable libvirtd    # systemctl status libvirtd 3. Login to the KVM host using console or do SSH:    ➤  ssh -l root kvmhost.example.com    The default config file will look like below: # cat  /etc/netplan/50-cloud-init.yaml network:     ethernets:         eno1:             addresses:             - 192.168.0.3/24             dhcp4: false             gateway4: 192.168.0.1             nameservers:                 addresses:       ...

Nested KVM(the ability to run kvm on kvm) configuration

Image
Its possible to configure nested KVM to deploy kvm guests. Its not a very ideal scenario for production environment but could be a better option to run Proof of Concept (PoC) for both standalone and clustered kvm platform. Standalone KVM Platform : virsh/virt-manager Clustered KVM Platform : oVirt/Openstack Fig-01: Low level Nested KVM Architecture   Both Intel and AMD processors support this feature. Following procedure can help to enable the nested KVM virtualization. [a] On Intel based KVM hypervisor :     To check if the nested KVM Kernel parameter is enabled:     # cat /sys/module/kvm_intel/parameters/nested       N     Create the following file:     # cat > /etc/modprobe.d/kvm-nested.conf <<_EOF       options kvm-intel nested=1       _EOF     Make sure no VM is running and remove & add the KVM module:     # modprobe -...