Centos 6.8下安装kvm虚拟化环境

系统版本:centos 6.8

加载kvm模块:modprobe kvm_intel

关闭SElinux :setenforce 0

安装kvm虚拟化组件:yum install kvm libvirt python-virtinst qemu-kvm

启动libvirtd :/etc/init.d/libvirtd start并加入开机启动chkconfig libvirtd on

ifcfg-br0

[root@localhost network-scripts]# cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=59.xx.xx.xx
NETMASK=255.255.255.128
GATEWAY=59.xx.xx.xx
DNS1=202.101.224.68
IPV6INIT=no
USERCTL=no
DELAY=0

ifcfg-em1

[root@localhost network-scripts]# cat ifcfg-em1
DEVICE=em1
TYPE=Ethernet
ONBOOT=yes
BRIDGE=br0
NM_CONTROLLED=yes
IPV6INIT=no
USERCTL=no

关闭networkmanager服务并重启网络服务:service network restart

查看网桥br0

[root@localhost network-scripts]# ifconfig br0
br0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx
inet addr:59.xx.xx.xx Bcast:59.xx.xx.xx Mask:255.255.255.128
inet6 addr: fe80::92b1:1cff:fe4b:f625/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:593343 errors:0 dropped:0 overruns:0 frame:0
TX packets:278804 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:591056831 (563.6 MiB) TX bytes:45965030 (43.8 MiB)

查看网桥:brctl show

[root@localhost network-scripts]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.90b11c4bf625 no em1
vnet0
vnet1
vnet2
virbr0 8000.525400891f7f yes virbr0-nic

 

您可以选择一种方式赞助本站

支付宝转账赞助

支付宝扫一扫赞助

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

图片 表情