First, install the KVM
Installing the KVM module, Administrative Tools, Libvirt command-line installation
[email protected] ~]# Yum install-y KVM Virt-manager libvirt
Note:
KVM: Virtualization Module
VIRT-MANAGER:KVM Graphical Management module
Libvirt: Virtualization Services
Extension: Can I install VMware on Rhel? Do you have a Linux version? OK
Linux has a VMware installation package and is a RPM package that is easy to install. RPM-IVH vmware-xxx.rpm
View
[[Email protected] ~]# service LIBVIRTD start virtualization Services
[email protected] ~]# chkconfig LIBVIRTD on
Note: KVM cannot start error: Version Base not defined in file libdevmapper.so.1.02 with link time reference
WORKAROUND: # Yum Upgrade Device-mapper-libs
2. Determine the correct loading of the KVM module
[email protected] ~]# lsmod |grep KVM
Kvm_intel 53484 0
KVM 316506 1 Kvm_intel
3. Check if the KVM is successfully installed you can use the Virsh command to check the status of the virtual machine
[email protected] ~]# Virsh list
Id Name State
----------------------------------------------------
Congratulations to you!!! Here, the KVM installation is successful.
Second, configure the use of KVM
1. Use the command Virt-manager to set up the virtual machine, the English interface by default
Switch the KVM management tool from the English interface to the Chinese interface:
[Email protected] ~]# echo $LANG
en_US. UTF-8
[Email protected] ~]# lang= ' ZH_CN. UTF-8 ' #只需要记住LANG = ' zh_cn ' after the same as shown behind
The Chinese interface is as follows:
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/86/DF/wKioL1fNoCmQIWblAAAqWiKdeG8273.jpg "title=" 2233. JPG "alt=" wkiol1fnocmqiwblaaaqwikdeg8273.jpg "/>
2. Configuring the KVM bridging feature
KVM uses NAT mode to provide network for virtual machines by default, KVM: VMs running under KVM are connected in a NAT manner, unable to communicate with the outside world, but can communicate with other VMS under the same KVM, in order to make the VMS communicate with other network hosts, You need to change the NIC mode from Nat to bridged.
Bridge Introduction: What we often call bridge equipment is actually a bridge device, it is equivalent to the current two-layer switch, for connecting
All the machines in the same network segment, so our goal is to add the network device eth0 to Br0, when Br0 becomes the so-called
Switch device, the ETH of our physical machine is also connected on top of the 650) this.width=650; "Src=" http://s2.51cto.com/wyfs02/M00/86/DF/ Wkiol1fnlpigt9qaaaaoehofbfq239.jpg-wh_500x0-wm_3-wmp_4-s_2042367585.jpg "title=" Figure 1.jpg "alt=" Wkiol1fnlpigt9qaaaaoehofbfq239.jpg-wh_50 "/>
To build the bridge device configuration file:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/86/E0/wKiom1fNnrehn_8QAABa39h7ZqM231.jpg "title=" Bridging the NIC configuration. jpg "alt=" wkiom1fnnrehn_8qaaba39h7zqm231.jpg "/>
#重启网络服务 Service Network Restart eth0 does not have an IP address br0 has an IP address
#查看网卡桥接信息以及路由信息 Brctl Show
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/86/E0/wKiom1fNn6Sgn2ljAAB0FGQ21Mo460.jpg "title=" Network card routing. jpg "alt=" wkiom1fnn6sgn2ljaab0fgq21mo460.jpg "/>
The Eth0 bridge is then connected to the BR0 network card, and the VM can use this bridge to configure the
Note: Rebooting does not affect bridging because he is reading the IFCFG-XX configuration file for bridging
Iii. Creating a KVM virtual machine
This article is from the "kobebryant" blog, make sure to keep this source http://beautifual.blog.51cto.com/3678509/1846621
KVM Virtual machine installation and use