KVM Virtualization-Architecture and installation
Introduced
1. Integration into the kernel since Linux2.6.20
2. Relying on the CPU virtualization instruction set
3. Performance, safety, compatibility, stability, performance is very good
4. Each virtualized operating system behaves as a single system process
5. Good integration with Linux security module (selinux)
Operation
1. See if the CPU supports virtualization (with output that indicates CPU support virtualization)
Cat/proc/cpuinfo | grep vmx (Intel) or
Cat/proc/cpuinfo | grep SMV (AMD)
Tips: If there is no output, but also to determine that their CPU is to support virtualization, you can enter the BIOS to open it yourself Oh!
2. Build the Yum Warehouse
[[email protected] ~] #mkdir/MNT/CD in order not to affect the normal use of the original files under the/MNT, a new directory to create a CD
[Email protected] ~]# MOUNT/DEV/CDROM/MNT/CD
[Email protected] ~]# cd/etc/yum.repos.d/
[Email protected]]# ls
Rhel-source.repo
[[Email protected]]# mv Rhel-source.repo Rhel-source.repo.bak
[Email protected]]# vim Yum.repo
[Base]
Name=rhel6-yum
Baseurl=file:///mnt/cd
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
3. Installing the KVM software on an existing system
[Email protected] ~]# yum-yinstall QEMU-KVM qemu-kvm-tools python-virtinst.noarch qemu-img Bridge-utilsvirt-manager Libvirt
1.Desktop (with desktop can not install this)
2.qemu-kvm
3.qemu-kvm-tools
4.python-virtinst.noarch
5.qemu-img
6.bridge-utils
7.virt-manager
8.libvirt
4. Check if the installation is successful
[Email protected] ~]# lsmod |grep KVM
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/1F/wKiom1Wx4ADzumtwAAB_Kdzt1Ko927.jpg "title=" Image001.png "alt=" Wkiom1wx4adzumtwaab_kdzt1ko927.jpg "/>
5. Setting up a KVM network
1. The default is NAT mode, the virtual machine network cannot be accessed externally
2. Bridge mode, direct access to virtual machine internal network from outside
3. Need to edit NIC parameter file already supports bridging
[Email protected] ~]# Vim/etc/sysconfig/network-scripts/ifcfg-eth0
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/1D/wKioL1Wx6Oiwv81PAADyYyGXIdU488.jpg "title=" Image002.png "alt=" Wkiol1wx6oiwv81paadyyygxidu488.jpg "/>
[Email protected] ~]# vim/etc/sysconfig/network-scripts/ifcfg-br0
650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/70/20/wKiom1Wx5x7zBAOOAAC8FRyJU6w613.jpg " Title= "Image003.png" alt= "Wkiom1wx5x7zbaooaac8fryju6w613.jpg"/>
6. Create a KVM virtual machine
Virt-manager is a libvirt-based graphical virtual machine management software
Now let's switch to the desktop--Keep working
[[Email protected] ~] #virt-manager This will be an error, we just need to restart a bit.
[[Email protected] ~]# Init 6
[[Email protected] ~] #virt-manager
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/1C/wKioL1Wx4jSyGtwkAADGQTP58nY948.jpg "style=" float: none; "title=" Image004.png "alt=" Wkiol1wx4jsygtwkaadgqtp58ny948.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/1F/wKiom1Wx4E3QzgofAAFCVmuNEVM195.jpg "style=" float: none; "title=" Image005.png "alt=" Wkiom1wx4e3qzgofaafcvmunevm195.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/1C/wKioL1Wx4jTDoWSAAAGKHvgXYLY068.jpg "style=" float: none; "title=" Image006.png "alt=" Wkiol1wx4jtdowsaaagkhvgxyly068.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/1F/wKiom1Wx4E3gdjF6AAEKBX1cY34475.jpg "style=" float: none; "title=" Image007.png "alt=" Wkiom1wx4e3gdjf6aaekbx1cy34475.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/21/wKiom1Wx8TnTfqC-AAFYHHqNyYQ600.jpg "title=" Image008.png "alt=" Wkiom1wx8tntfqc-aafyhhqnyyq600.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/1F/wKiom1Wx4E3QBAmJAAI67HuklS8696.jpg "style=" float: none; "title=" Image009.png "alt=" Wkiom1wx4e3qbamjaai67hukls8696.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/70/1F/wKiom1Wx4U2DSsTIAAENI-chnRk445.jpg "title=" Image011.png "alt=" Wkiom1wx4u2dsstiaaeni-chnrk445.jpg "/>
Here the entire KVM virtual machine is created, everyone refueling Oh!
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/1F/wKiom1Wx4FDDnl0lAANZlnjmfHE623.jpg "style=" float: none; "title=" Image012.png "alt=" Wkiom1wx4fddnl0laanzlnjmfhe623.jpg "/>
This article is from the "Rslinux" blog, make sure to keep this source http://routeslinux.blog.51cto.com/9322509/1678022
KVM Virtualization-Architecture and installation