Preparatory work:
Operating system: Ubuntu 16.04
Installing KVM
1. See if the CPU supports virtualization
[Email protected]:~# grep-e "VMX|SVM"/proc/cpuinfo
The output is as follows:
FLAGS:FPU VME de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 clflush DTS ACPI MMX FXSR SSE SSE2 SS HT TM PBE syscall NX rdtscp lm constant_tsc Arch_perfmon pebs BTS rep_good nopl xtopology nonstop_tsc aperfmperf eagerf PU PNI pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_dead Line_timer xsave AVX lahf_lm ida Arat EPB PLN pts dtherm Tpr_shadow vnmi flexpriority ept vpid xsaveopt
2, installing KVM
[Email protected]:~# apt-get Install QEMU-KVM ubuntu-vm-builder bridge-utils
3. Enable the KVM module
[Email protected]:~# modprobe KVM
[Email protected]:~# modprobe Kvm_intel
[Email protected]:~# modprobe KVM_AMD
4. Check if KVM is installed successfully:
[Email protected]:~# Kvm-ok
INFO:/DEV/KVM exists
KVM acceleration can used
5, add root to KVM Group
[Email protected]:~# adduser Root KVM
Adding user ' root ' to group ' KVM ' ...
Adding user root to group KVM
Done.
6, install Libvirt
[Email protected]:~# apt-get Install libvirt-bin qemu virt-manager
7. Check if Libvirt is installed successfully
[Email protected]:~# service Libvirt-bin start #启动libvirt
[Email protected]:~# virsh list--all #如下输出表示正常
Id Name State
----------------------------------------------------
8, management interface
[Email protected]:~# Virt-manager
OpenStack Learning (i) kvm-libvirt