- OS version: CentOS Linux release 7.6.1810 (Core)
- Install KVM kernel
- yum install -y CentOS-release-qemu-ev.noarch
- yum install -y qemu-kvm.x86_64 qemu-kvm-tools.x86_64
- Install virt mgmt tool
- yum install libvirt.x86_64 libvirt-cim.x86_64 libvirt-client.x86_64 libvirt-java.noarch libvirt-python.x86_64 virt-*
- Load KVM kernel
- modprobe kvm
- modprobe kvm-intel
- Verify service
- lsmod | grep kvm
- Via vnc client to connect KVM server
- ( about how to config VNC, check this: https://blog.51cto.com/snowlai/2301463 )
- virt-manager
- Enable and Start libvirtd service
- systemctl start libvirtd
- systemctl enable libvirtd OR chkconfig libvirtd on
- ps -ef | grep libvirtd
- Create virtual switch for Guest OS - use bridge way
- VIM ifcfg-br0
- ###################################
- DEVICE=br0
- BOOTPROTO=static
- ONBOOT=yes
- IPADDR=xxxx.xxxx.xxxx.xxxx
- NETMASK=255.255.255.0
- TYPE=Bridge
- ###################################
- VIM ifcfg-eno1
- ###################################
- TYPE=Ethernet
- BOOTPROTO=none
- NAME=eno1
- DEVICE=eno1
- ONBOOT=yes
- BRIDGE=br0
- ###################################
- Reboot NIC
- /etc/init.d/network restart
- Verify br0 is actived
- ifconfig | grep br0
So far you are able to create VMs from KVM
来源: http://www.bubuko.com/infodetail-3111127.html