KVM虚拟环境安装

关闭防火墙  linux

半虚拟化是不能运行与安装KVM虚拟机的。
#egrep '(vmx|svm)' --color=always /proc/cpuinfo

yum -y install kvm python-virtinst libvirt tunctl bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v   virt-install

yum -y install libguestfs-tools

yum update librbd1

启动 KVM
1) modprobe kvm  加载 kvm 模块
2) lsmod | grep kvm  查看加载成功
3) systemctl start libvirtd
4) systemctl status libvirtd
5) virsh  -c qemu:///system list
如出现
Id Name State
-------------------------------------------------------
则安装成功


添加 br0 网卡的配置文件
cd /etc/sysconfig/network-scripts
cp ifcfg-em1 ifcfg-br0

Vim ifcfg-br0

TYPE="Bridge"
BOOTPROTO="static"
NAME="br0"
DEVICE="br0"
ONBOOT="yes"
IPADDR="192.168.4.200"
NETMASK="255.255.255.0"
GATEWAY="192.168.4.1"

Vim ifcfg-em1

TYPE="Ethernet"
NAME="em1"
DEVICE="em1"
ONBOOT="yes"
BRIDGE="br0"

systemctl restart network
brctl show

 

posted @ 2019-03-21 09:57  侃豺小哥  阅读(264)  评论(0编辑  收藏  举报