Installing KVM Learning in VM virtual machines

Source: Internet
Author: User

Enable Tv-x and amd-v virtualization support in VM virtual machines

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/5F/wKiom1WaNsjgxDDDAAKp9ICe1wY881.jpg "title=" 1.png " alt= "Wkiom1wansjgxdddaakp9ice1wy881.jpg"/>


servers in a production environment BIOS Open Inter Virtual techmolony enabled

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/5C/wKioL1WaOKegGVyPAAESAIf5Cug653.jpg "title=" 2.png " alt= "Wkiol1waokeggvypaaesaif5cug653.jpg"/>


    1. we use the Yum -source approach to install

Vi/etc/yum.repos.d/yum.repo

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/5F/wKiom1WaNzOSuka9AAEr4q57X1I726.jpg "title=" 3.png " alt= "Wkiom1wanzosuka9aaer4q57x1i726.jpg"/>

    1. Mount Mount/dev/cdrom/root/zzx

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/5C/wKioL1WaOQ7ALXDgAABdUiaFguc283.jpg "title=" 4.png " alt= "Wkiol1waoq7alxdgaabduiafguc283.jpg"/>

    1. installing the KVM tool

Check if the host supports KVM

Lsmod | grep KVM

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/5F/wKiom1WaN0vB4MMzAACoTe7Kw5w339.jpg "title=" 5.png " alt= "Wkiom1wan0vb4mmzaacote7kw5w339.jpg"/>

Grep-e ' (VMX|SVM) '/proc/cpuinfo

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/5F/wKiom1WaN1rxDUl_AAK4ZsNQBqc716.jpg "title=" 6.png " alt= "Wkiom1wan1rxdul_aak4zsnqbqc716.jpg"/>

Yum Install KVM

Yum Install QEMU-KVM gcc

installing the KVM Toolkit

Yum Install Virt-manager python-virtinst qumu-kvm-tools

installing The KVM time management driver

Yum Install Libvirtlibvirt-python

    1. Create a KVM virtual hard disk

Qemu-img create–f Raw/opt/kvm.raw 10G

copy image to KVM use

Mkdir/data/vmdisk-p-- Create a virtual disk directory

Mkdir/iso--- create an ISO

Mount ISO image

DD If=/dev/cdrom Of=/opt/rhel6.5.iso

    1. Create a KVM virtual machine

Virt-install--virt-type KVM--name kvm-demo--ram 512--cdrom=/opt/rhel6.5.iso--network network=default--graphicsvnc, listen=0.0.0.0--noautoconsole--os-type=linux--os-variant=rhel6--diskpath=/opt/kvm.raw

    1. Check the KVM process

PS Uax |grep KVM

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/5C/wKioL1WaOTmgHHRUAAQ8JQaF8cE416.jpg "title=" 7.png " alt= "Wkiol1waotmghhruaaq8jqaf8ce416.jpg"/>

Netstat-ntlp

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/5F/wKiom1WaN4DTYBwEAAOsX0Zxk0U650.jpg "title=" 8.png " alt= "Wkiom1wan4dtybweaaosx0zxk0u650.jpg"/>

    1. using a VNC client to install a KVM virtual machine

connecting the current native IP

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/5C/wKioL1WaOV2x1LP6AACywgip8eM070.jpg "title=" 9.png " alt= "Wkiol1waov2x1lp6aacywgip8em070.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/5F/wKiom1WaN5yhhC2iAAFwtkm3KCQ770.jpg "title=" 10.png "alt=" Wkiom1wan5yhhc2iaafwtkm3kcq770.jpg "/>

    1. View the list of installed virtual machines under KVM

Virsh List

Virsh List–all

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/5F/wKiom1WaN7ahY7YAAAEYnXUTlfQ107.jpg "title=" 11.png "alt=" Wkiom1wan7ahy7yaaaeynxutlfq107.jpg "/>

Force shutdown of demo1 virtual machine Virsh destroy Kvm-demo1

Remove a virtual machine Virsh undefine kvm-demo1


Installing KVM Learning in VM virtual machines

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.