This article uses RHEL/ centos 7.x operating system.
Check whether the CPU supports virtualization
KVM is vm software based on the x86 virtualization extension (Intel VT or AMD-V) technology. Therefore, you can check whether the CPU supports THE VT technology to determine whether KVM is supported. If VMX (Intel) or SVM (AMD) is displayed in the result, it indicates that the CPU is supported.
egrep -c '(vmx|svm)' /proc/cpuinfo
cat /proc/cpuinfo | egrep 'vmx|svm'
Copy the code
Close the SELinux
Change selinux =enforcing in /etc/sysconfig/selinux to selinux =disabled
Install vm components
yum groupinstall 'Virtualization' 'Virtualization Client' 'Virtualization Platform' 'Virtualization Tools' -y
systemctl enable libvirtd
systemctl start libvirtd
Copy the code
Virtualization Package Groups
Package Group | Description | Mandatory Packages | Optional Packages |
---|---|---|---|
Virtualization Hypervisor |
Smallest possible virtualization host installation | libvirt, qemu-kvm, qemu-img | qemu-kvm-tools |
Virtualization Client |
Clients for installing and managing virtualization instances | gnome-boxes, virt-install, virt-manager, virt-viewer, qemu-img | virt-top, libguestfs-tools, libguestfs-tools-c |
Virtualization Platform |
Provides an interface for accessing and controlling virtual machines and containers | libvirt, libvirt-client, virt-who, qemu-img | fence-virtd-libvirt, fence-virtd-multicast, fence-virtd-serial, libvirt-cim, libvirt-java, libvirt-snmp, perl-Sys-Virt |
Virtualization Tools |
Tools for offline virtual image management | libguestfs, qemu-img | libguestfs-java, libguestfs-tools, libguestfs-tools-c |
Access.redhat.com/documentati…
Check whether the KVM module is correctly loaded
# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
lsmod | grep kvm
kvm_intel 162153 0
kvm 525259 1 kvm_intel
Copy the code