CentOS下安装配置KVM
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS下安装配置KVM相关的知识,希望对你有一定的参考价值。
CentOS下安装配置KVMOS version: CentOS Linux release 7.6.1810 (Core)
Install KVM kernel
yum install -y centos-release-qemu-ev.noarch
yum install -y qemu-kvm.x86_64 qemu-kvm-tools.x86_64
Install virt mgmt tool
yum install libvirt.x86_64 libvirt-cim.x86_64 libvirt-client.x86_64 libvirt-java.noarch libvirt-python.x86_64 virt-*
Load KVM kernel
modprobe kvm
modprobe kvm-intel
Verify service
lsmod | grep kvm
Via vnc client to connect KVM server
( about how to config VNC, check this: https://blog.51cto.com/snowlai/2301463 )
virt-manager
Enable and Start libvirtd service
systemctl start libvirtd
systemctl enable libvirtd OR chkconfig libvirtd on
ps -ef | grep libvirtd
Create virtual switch for Guest OS - use bridge way
vim ifcfg-br0
###################################
DEVICE=br0
BOOTPROTO=static
ONBOOT=yes
IPADDR=xxxx.xxxx.xxxx.xxxx
NETMASK=255.255.255.0
TYPE=Bridge
###################################
vim ifcfg-eno1
###################################
TYPE=Ethernet
BOOTPROTO=none
NAME=eno1
DEVICE=eno1
ONBOOT=yes
BRIDGE=br0
###################################
Reboot NIC
/etc/init.d/network restart
Verify br0 is actived
ifconfig | grep br0
So far you are able to create VMs from KVM
以上是关于CentOS下安装配置KVM的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu 16.04下使用VMware安装CentOS 6.9然后在里面再安装KVM之后配置网桥无法上网的问题