CentOS 7 System Installation Configure KVM software steps

Source: Internet
Author: User
Tags centos

In the KVM installation section under CentOS 6, I wrote a summary of KVM virtualization (i) KVM environment installation. As the CentOS 7 compared to the previous version has changed a lot, the current test CentOS 7 Environment KVM installation and construction, as follows.

First, the installation of KVM software

Since you have previously done a more detailed KVM installation and summary, here are just a few steps:

The code is as follows Copy Code
[Root@361way ~]# yum-y install QEMU-KVM libvirt virt-install bridge-utils
[Root@361way ~]# Lsmod | grep KVM # Make sure modules are loaded
KVM 441119 0
[Root@361way ~]# systemctl start LIBVIRTD
[Root@361way ~]# Systemctl Enable LIBVIRTD

Note: Centos7 on the service management mode replaced by SYSTEMCTL.

Two, configure the network card bridge to connect

Centos7 on the default is no longer eth0, eth1, my PC server installed the first network card into the ENP3S0, the modification steps and CentOS 6 no difference, as follows

The code is as follows Copy Code
[Root@361way ~]# cd/etc/sysconfig/network-scripts/
[Root@361way network-scripts]# Cat Ifcfg-br0
Type=bridge
Bootproto=none
Device=br0
Onboot=yes
ipaddr0=192.168.0.102
Prefix0=24
gateway0=192.168.0.1
[Root@361way network-scripts]# Cat Ifcfg-enp3s0
Device=enp3s0
Type=ethernet
Onboot=yes
Bridge=br0
[Root@361way ~]reboot
[Root@361way network-scripts]# Ifconfig
br0:flags=4163 MTU 1500
inet 192.168.0.102 netmask 255.255.255.0 broadcast 192.168.0.255
Inet6 fe80::7a24:afff:fe46:ca60 Prefixlen ScopeID 0x20
Ether 78:24:af:46:ca:60 Txqueuelen 0 (Ethernet)
RX packets 129 bytes 14676 (14.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets 148 Bytes 21994 (21.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp3s0:flags=4163 MTU 1500
Ether 78:24:af:46:ca:60 Txqueuelen 1000 (Ethernet)
RX packets 129 bytes 16482 (16.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets 148 Bytes 21994 (21.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Lo:flags=73 MTU 65536
inet 127.0.0.1 netmask 255.0.0.0
Inet6:: 1 prefixlen 128 ScopeID 0x10
Loop Txqueuelen 0 (local loopback)
RX Packets 9 Bytes 728 (728.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets 9 Bytes 728 (728.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0:flags=4099 MTU 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
Ether a6:88:9f:14:b2:66 Txqueuelen 0 (Ethernet)
RX Packets 0 Bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets 1 bytes (90.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[Root@361way network-scripts]# IP Add show
1:LO:MTU 65536 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
Valid_lft Forever Preferred_lft Forever
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:ENP3S0:MTU 1500 Qdisc pfifo_fast Master br0 State up Qlen 1000
Link/ether 78:24:af:46:ca:60 BRD FF:FF:FF:FF:FF:FF
3:BR0:MTU 1500 Qdisc Noqueue State up
Link/ether 78:24:af:46:ca:60 BRD FF:FF:FF:FF:FF:FF
inet 192.168.0.102/24 BRD 192.168.0.255 Scope Global BR0
Valid_lft Forever Preferred_lft Forever
Inet6 FE80::7A24:AFFF:FE46:CA60/64 Scope link
Valid_lft Forever Preferred_lft Forever
4:VIRBR0:MTU 1500 Qdisc noqueue State down
Link/ether a6:88:9f:14:b2:66 BRD FF:FF:FF:FF:FF:FF
inet 192.168.122.1/24 BRD 192.168.122.255 Scope Global VIRBR0
Valid_lft Forever Preferred_lft Forever

Note: As the IP command belongs to the tools in the Iproute2 package, as a substitute for the old ifconfig command, it is customary to use new commands and tools to eliminate old software and tools.

Third, SELinux firewall shutdown

  code is as follows copy code

# Setenforce   0
# sed-i ' s/=enforcing/=disabled/g '/etc/selinux/config

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.