CentOS installs the KVM environment and configures the network Bridge

Source: Internet
Author: User

Before the need to use the KVM environment, on the Internet to check a lot of relevant information, but in the installation time still spent a lot of time, this is a long time to explore the experience summed up, share to everyone.

CentOS installation KVM Environment

First, operating system configuration

1. Modify kernel mode to boot to compatible kernel

Vi/boot/grub/grub.conf


2. Turn off selinuxand take effect after reboot

Vi/etc/selinux/config


3. Shut down the firewall: service iptables stop


Second, the configuration of the virtualized environment

1. Check whether the CPU supports full virtualization:

Egrep ' (VMX|SVM) '/proc/cpuinfo


2,theKVM component needs to install the package

Package Name

Role

Qemu-kvm

KVM Core Modules

Libvirt

Virtual machine management tools, middleware for operation of virtual machines integrated with various interface library functions

Python-virtinst

Record the XML file that created the VM

Bridge-utils

Bridge Support Tools

Virt-viewer

Graphical viewing capabilities

Virt-manager

Install the graphical interface to manage virtual machines,Virt-manager The operation of virtual machines via libvirt

Check that these packages are installed

Rpm-q QEMU-KVM libvirt python-virtinst virt-viewer virt-manager bridge-utils

Install these packages

Yum-y Install QEMU-KVM libvirt python-virtinst virt-viewer virt-manager bridge-utils



Third, view the virtualized environment

1. restart libvirt Services:serviceLIBVIRTD Restart

2. View the virtualized environment:virsh-c qemu:///system list


3. View KVM module support:lsmod | grep KVM


4. View the virtual Tools version:

Virsh--version

Virt-install--version

Ln-s/USR/LIBEXEC/QEMU-KVM/USR/BIN/QEMU-KVM

Qemu-kvm-version


Note:

1, before installation, it is best to replace the source of CentOS 163 source.

2. Gnome: is a tool that allows users to easily operate and set up a computer environment,Gnome contains the Panel (used to start the program and show the current state), desktop (where applications and data are placed), as well as a range of standard desktop tools and applications, and enable individual applications to function properly. It's easy to use GNOME 's powerful graphical interface tools, no matter what operating system you've used before.


Iv. manual configuration of virtual bridges

1. Close networkmanager service

Chkconfig NetworkManager off

Service NetworkManager Stop

2. Create br0 Bridge

[Email protected]~] #cd/etc/sysconfig/network-scripts/
[email protected] network-scripts]# CP ifcfg-em4 IFCFG-BR0

IFCFG-EM4 File:

Device=em1

Addr=c8:1f:66:dc:5e:c5

Type=ethernet

Uuid=01006cba-ade7-4f92-9d3d-0ffeb6c968cd

Onboot=yes

Nm_controlled=yes

Bootproto=static

ipaddr=192.168.129.12

gateway=192.168.129.1

dns1=192.168.129.1

Ifcfg-br0 File:


3. After the networkmanager service is closed, the network can be managed via service network restart .

4, view bridge br0.


5. View Network Bridge


CentOS installs the KVM environment and configures the network Bridge

Related Article

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.