1. Configure the hypervisor
(1) Check whether VMS are supported
Note 1: You cannot run and install KVM VMS in paravirtualization.
[root@MySQL ~]# egrep '(vmx|svm)' --color=always /proc/cpuinfo
Copy the code
(2) Install the KVM software package
[root@MySQL ~]# yum -y install kvm python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v libguestfs-tools
Copy the code
2. View the hypervisor
(1) Check the VM environment
[root@MySQL ~]# /etc/init.d/libvirtd start
[root@MySQL ~]# virsh -c qemu:///system list
Copy the code
(2) Check the KVM module support
[root@MySQL ~]# lsmod | grep kvm
Copy the code
(3) View the virtual tool version
[root@MySQL ~]# virsh --version
[root@MySQL ~]# virt-install --version
[root@MySQL ~]# ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm
[root@MySQL ~]# qemu-kvm -version
Copy the code
3. Configure a virtual bridge
(1) Disable the NetworkManager service
[root@MySQL ~]# /etc/init.d/NetworkManager stop
[root@MySQL ~]# chkconfig NetworkManager off
Copy the code
(2) Create br0 bridge
[root@MySQL ~]# cd /etc/sysconfig/network-scripts/
[root@MySQL network-scripts]# cp ifcfg-eth0 ifcfg-br0
Copy the code
(3) Service Networkr Estart can be used to manage the network only after the NetworkManager service is disabled.
(4) Check bridge BR0
[root@MySQL network-scripts]# ifconfig
[root@MySQL network-scripts]# brctl show
Copy the code