Virtualization with KVM

  • KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).




  • A virtual machine (VM) essentially consists of two parts:
    XML configuration file: /etc/libvirt/qemu/vm.xml
    Disk partition or image file, by default: /var/lib/libvirt/images/vm.img

    Exercise
  • To see if the processor supports hardware virtualization:
    egrep -c '(vmx|svm)' /proc/cpuinfo
    
    If 0 it means that your CPU doesn't support hardware virtualization. If 1 or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
  • Verify that the BIOS has virtualization enabled
    kvm-ok
    
    If it shows
    INFO: Your CPU supports KVM extensions
    INFO: KVM is disabled by your BIOS
    
    the Intel Virtualization Technology needs to be enabled in the BIOS.
    On the other hand, if you see the outbut below, the Intel-VT is enabled.
    INFO: Your CPU supports KVM extensions
    INFO: /dev/kvm exists
    KVM acceleration can be used