标签:
1、背景
近日将主要精力放在Linux下测试MySQL Replication,宿主机安装了Centos7.0系统,需要安装三台虚拟机。因此,尝试了一下在Centos7.0上安装虚机机。
2、安装步骤
(1)yum源安装软件(前提:CPU开启虚拟化)
[root@localhost ~]# yum install qemu-kvm libvirt virt-install bridge-utils virt-manager vir-viewer
(2)查看模块支持
[root@localhost ~]# lsmod | grep kvm #make sure modules are loaded
kvm_intel 138567 0
kvm 441119 1 kvm_intel
(3)启动服务
[root@localhost ~]# systemctl enable libvirtd
[root@localhost ~]# systemctl start libvirtd
(4)配置网络
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# cp ifcfg-enp3s0 ifcfg-br0
[root@localhost network-scripts]# cat ifcfg-br0
TYPE=Bridge
BOOTPROTO=none
DEVICE=br0
ONBOOT=yes
IPADDR0=192.168.9.233
PREFIX0=26
GATWAY0=192.168.9.254
[root@localhost network-scripts]# cat ifcfg-enp3s0
HWADDR=AC:22:0B:74:57:1E
TYPE=Ethernet
BRIDGE=br0
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="enp3s0"
UUID=1c80a08d-be65-462b-9788-84dd477f3360
ONBOOT=yes
[root@localhost network-scripts]# systemctl restart network
标签:
原文地址:http://www.cnblogs.com/lvfeilong/p/876hkkj.html