CentOS下安裝配置KVM

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
CentOS下安裝配置KVM

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
CentOS下安裝配置KVM

So far you are able to create VMs from KVM

CentOS下安裝配置KVM

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章