RHCE Study Notes (+)-KVM

Source: Internet
Author: User

This section and the teacher simply learned the basics of getting started with KVM, including how to install VMs through a graphical interface, basic configuration, and a few basic commands.


beans on other platforms of virtual machines are familiar with, esxi,hyper-v,xenserver, and so on, KVM and these 3 platforms compared, the popularity is lower, the beans searched the contrast evaluation on the internet, Flexiant released a white paper, concluding that I was a little surprised, as an enterprise-class leader, definitely ESXi, but considering the cost-effective, KVM rankings are still on top of hyper-V and Xen.


KVM (kernel-based VMs), which means kernel-based virtual machines. Specific principles and architecture beans but more elaborate, because I am now also rookie 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0083.gif "alt=" J_0083.gif "/> There's a blog here that explains or is quite clear https://www.linuxwind.org/html/learning-the-kvm-01.html


The following shows the steps for documenting the experiment, actually doing a nested operation on one of my existing ESXi rhel virtual machines.


First Rhel CPU needs to be set up to support virtualization

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxIWAlF9zAAHRmSXnK-c967.jpg "style=" float: none; "title=" 1.PNG "alt=" Wkiol1stxiwalf9zaahrmsxnk-c967.jpg "/>

Check the configuration file to confirm that VMX has been added


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/49/wKiom1Stw8SBjzhkAAIrbpZo72A180.jpg "style=" float: none; "title=" 2.PNG "alt=" Wkiom1stw8sbjzhkaairbpzo72a180.jpg "/>


Configure the Yum source to view the group

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxIbAMdaeAAF1TA4cZq8684.jpg "style=" float: none; "title=" 3.PNG "alt=" Wkiol1stxibamdaeaaf1ta4czq8684.jpg "/>


Installation Group

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/49/wKiom1Stw8WBSK24AAN9hs7hm2w070.jpg "style=" float: none; "title=" 4.PNG "alt=" Wkiom1stw8wbsk24aan9hs7hm2w070.jpg "/>


See if the service starts when you're done.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/46/wKioL1StxIew-n5eAABIUBqTtP0019.jpg "style=" float: none; "title=" 5.PNG "alt=" Wkiol1stxiew-n5eaabiubqttp0019.jpg "/>


If Virt-manager is not installed, install

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/49/wKiom1Stw8azySKDAAGLv9vspFs598.jpg "style=" float: none; "title=" 6.PNG "alt=" Wkiom1stw8azyskdaaglv9vspfs598.jpg "/>


After the installation, the background opens Virt-manger & you can create the virtual machine.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxIjwOXcJAAEdcJoGqkA612.jpg "style=" float: none; "title=" 7.PNG "alt=" Wkiol1stxijwoxcjaaedcjogqka612.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/49/wKiom1Stw8fhE8igAAFPcOv1DgI543.jpg "style=" float: none; "title=" 8.PNG "alt=" Wkiom1stw8fhe8igaafpcov1dgi543.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxImC967gAAEsDqB2-sQ978.jpg "style=" float: none; "title=" 9.PNG "alt=" Wkiol1stximc967gaaesdqb2-sq978.jpg "/>


Go all the way down, modify it according to your needs.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/49/wKiom1Stw8iiOSfkAADHpUlFFcc388.jpg "style=" float: none; "title=" 10.PNG "alt=" Wkiom1stw8iiosfkaadhpulffcc388.jpg "/>


The beans have a Ubuntu12 virtual machine installed.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/49/wKiom1Stw8mRK8eYAAE5O46R46E831.jpg "style=" float: none; "title=" 11.PNG "alt=" Wkiom1stw8mrk8eyaae5o46r46e831.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/46/wKioL1StxIvQ4Yy8AAENzI7bTVM787.jpg "style=" float: none; "title=" 12.PNG "alt=" Wkiol1stxivq4yy8aaenzi7btvm787.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/49/wKiom1Stw8qBoew2AACubU92cqU909.jpg "style=" float: none; "title=" 13.PNG "alt=" Wkiom1stw8qboew2aacubu92cqu909.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxIyzOw17AAKjOKQK7NI425.jpg "style=" float: none; "title=" 14.PNG "alt=" Wkiol1stxiyzow17aakjokqk7ni425.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/49/wKiom1Stw8yQshKSAAGrwHLbsS0120.jpg "style=" float: none; "title=" 15.PNG "alt=" Wkiom1stw8yqshksaagrwhlbss0120.jpg "/>


After about 20 minutes, turn on the virtual machine, click on the lamp pattern, you can view the configuration

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxI7ASuU_AAISLxPlwl0406.jpg "style=" float: none; "title=" 16.PNG "alt=" Wkiol1stxi7asuu_aaislxplwl0406.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/49/wKiom1Stw87gVQyRAAKCYE57vwE376.jpg "style=" float: none; "title=" 17.PNG "alt=" Wkiom1stw87gvqyraakcye57vwe376.jpg "/>

The default network configuration is NAT

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxJCyRBTkAADYak-J4Jo886.jpg "style=" float: none; "title=" 18.PNG "alt=" Wkiol1stxjcyrbtkaadyak-j4jo886.jpg "/>


On the host to see, there will be a virtual network card out, the virtual network card for the virtual machine, the equivalent of a switch


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/49/wKiom1Stw9DjKEymAANtvzCG8oo537.jpg "style=" float: none; "title=" 19.PNG "alt=" Wkiom1stw9djkeymaantvzcg8oo537.jpg "/>


He is able to ping the virtual machine from the host, or even the virtual machine can directly ping my physical machine, the equivalent of the virtual machine eth0 network card connected to the Virbr0, and then virbr0 connected to the Rhel ENO network card, so that a layer of forwarding out


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/46/wKioL1StxJKBOnRyAAEyGuZEgJY002.jpg "style=" float: none; "title=" 20.PNG "alt=" Wkiol1stxjkbonryaaeyguzegjy002.jpg "/>


Switch to root user, can execute command line to operate, Virsh have hundreds of options, the simplest such as view, start, close

Note the difference between Virsh shutdown and Virsh destroy, the former is normally closed, the latter equivalent to Poweroff (direct power off)

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/49/wKiom1Stw9GQ5m6ZAACQgqpl7F4691.jpg "style=" float: none; "title=" 21.PNG "alt=" Wkiom1stw9gq5m6zaacqgqpl7f4691.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxJPDW8RCAABD9dyghA8999.jpg "style=" float: none; "title=" 22.PNG "alt=" Wkiol1stxjpdw8rcaabd9dygha8999.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/49/wKiom1Stw9PhNo17AAFFRAxPrLY981.jpg "style=" float: none; "title=" 23.PNG "alt=" Wkiom1stw9phno17aaffraxprly981.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxJTh0TdTAACKt1stb88487.jpg "style=" float: none; "title=" 24.PNG "alt=" Wkiol1stxjth0tdtaackt1stb88487.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/49/wKiom1Stw9SgPqNOAAA69hyiRtE900.jpg "style=" float: none; "title=" 25.PNG "alt=" Wkiom1stw9sgpqnoaaa69hyirte900.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/46/wKioL1StxJWBCCrlAABBXifddc4518.jpg "style=" float: none; "title=" 26.PNG "alt=" Wkiol1stxjwbccrlaabbxifddc4518.jpg "/>



For a host, we can also configure it, such as adding a new network, which is similar to the VMware workstation.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/4A/wKiom1Stw9XzuPcdAAFyZGlCNSw139.jpg "style=" float: none; "title=" 27.PNG "alt=" Wkiom1stw9xzupcdaafyzglcnsw139.jpg "/>


Add a random

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxJfyV1SaAAJ1GFn8esw638.jpg "style=" float: none; "title=" 28.PNG "alt=" Wkiol1stxjfyv1saaaj1gfn8esw638.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1StxJiQZgKcAAE8QHfSRCQ840.jpg "style=" float: none; "title=" 29.PNG "alt=" Wkiol1stxjiqzgkcaae8qhfsrcq840.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/4A/wKiom1Stw9iz1p2UAADf9lNPKoc762.jpg "style=" float: none; "title=" 30.PNG "alt=" Wkiom1stw9iz1p2uaadf9lnpkoc762.jpg "/>


Once the host has been modified, the new network option will be visible on the VM, which is equivalent to the choice of one more switch.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/46/wKioL1StxJqw6Ef-AAFqiMh2TxQ121.jpg "style=" float: none; "title=" 31.PNG "alt=" Wkiol1stxjqw6ef-aafqimh2txq121.jpg "/>


After rebooting, you can see that two NICs are configured.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/4A/wKiom1Stw9mhUwlSAAFNmU_XiHo364.jpg "style=" float: none; "title=" 32.PNG "alt=" Wkiom1stw9mhuwlsaafnmu_xiho364.jpg "/>



Finally say the storage pool, this is the default VM file storage point

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/4A/wKiom1StyAmAWwY7AAEaZofGhyQ631.jpg "title=" 33.PNG "alt=" Wkiom1styamawwy7aaeazofghyq631.jpg "/>

Take a look


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/46/wKioL1Stydvghbk_AACtNQIcUCI192.jpg "title=" 34.PNG "alt=" Wkiol1stydvghbk_aactnqicuci192.jpg "/>

This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1600499

RHCE Study Notes (+)-KVM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.