KVM

From Han Wiki
Revision as of 15:48, 5 July 2018 by Mhan (talk | contribs) (→‎Install packages and start libvirtd: configure bridged networking)

Jump to navigation Jump to search

Kernel-based Virtual Machine. A hypervisor technology featuring tight integration to Linux kernel.

Installation

Installing on CentOS 7.5

  • Tested on CentOS 7.5.1804

Install packages and start libvirtd

Install required packages:

# yum install qemu-kvm libvirt libvirt-python libguestfs-tools virt-install

Start the libvirtd service:

# systemctl enable libvirtd
# systemctl start libvirtd

Make sure KVM module loaded using lsmod command:

# lsmod | grep -i kvm
kvm_intel             178927  0
kvm                   578558  1 kvm_intel
irqbypass              13503  1 kvm

Configure bridged networking

Libvirtd configures a dhcpd-based network bridge by default. You can check in the following way:

# brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.525400f0c02d       yes             virbr0-nic

# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes