1. Check whether the CPU supports virtualization and execute the command # cat / proc / cpuinfo | grep flags
The appearance of VMX or SVM indicates CPU support, where SVM is for AMD platform and VMX is for Intel platform.
2. The KVM installation package has been included in the installation package of the system disk. Mount the CD directly and set the yum source as the local CD
Yum — disableepo = \ * — enablerepo = C5 media groupinstall ‘KVM’ installation
Check whether the system has loaded the KVM module
kvm_intel 86920 0
kvm 226208 2 ksm，kvm_ If Intel does not display, restart the system will display!
Method 2 [email protected] ~］# virsh -c qemu:///system list
Id Name State
———————————-No error message means that the installation is correct!
3. Restart the computer, enter the BIOS, and turn on the virtualization function of CPU (according to the different BIOS, find it yourself)!)
BIOS — “advanced –” processor configuration — “Intel (R) virtualization technology select enable,
4. Create a bridge (no bridge utils tools need to be installed, the system has been installed by default)
cp ifcfg-eth0 ifcfg-br0
#Bootproto = none
Hwaddr = 38:60:77:30:5a:16
#Type = Ethernet comment out
Bridge = BR0 add
#Netmask = 255.255.255.0 comment out
#IPADDR = 192.168.0.32
#Gateway = 192.168.0.1
Hwaddr = 38:60:77:30:5a:16 can not be written
Type = bridge is very important
Netmask = 255.255.255.0, according to the actual situation
IPADDR = 192.168.0.32 I specify IP manually, or I can get it automatically by DHCP!!
Gateway = 192.168.0.1, according to the actual situation
Service network restart ifconfig view related information
5. Enter the graphical interface of the system, and click virtual machine manager under applications — system tools to open it
6. Install the operating system in KVM, the method is similar to that in VMware.
When selecting the network connection mode, select nat (bridge BR0)!!!
The virtual system image path is / var / lib / libvirt / images /, and the corresponding. Img file can be deleted for unnecessary virtual systems.
7. After setting, wait for the system to be installed. Because the network mode is bridge BR0, the system can be connected to the Internet after the system is installed and restarted.
The above is the method of installing KVM virtual machine in centos5.5. Before installing, you should check whether the system CPU supports virtualization to avoid installation errors.