码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS下安装配置KVM

时间:2019-07-02 14:49:34      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:ifconfig   libvirtd   star   use   bootproto   lsm   too   xxxx   boot   

CentOS下安装配置KVM


OS 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

标签:ifconfig   libvirtd   star   use   bootproto   lsm   too   xxxx   boot   

原文地址:https://blog.51cto.com/snowlai/2416164

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!