OpenSUSE Leap 15: Install KVM for virtualization

This article will describe installing KVM.

1 Install KVM

Install packages for KVM.

> sudo zypper -n in patterns-openSUSE-kvm_server \
       patterns-server-kvm_tools guestfs-tools
> sudo systemctl enable libvirtd
> sudo systemctl restart libvirtd

The user in libvirt group can run virt-manager without sudo.

> sudo gpasswd -a "${USER}" libvirt

2 VNC port

Allow VNC port with using vnc-server.xml so that other machine can access virtual machine.

> sudo firewall-cmd --add-service=vnc-server --permanent
> sudo firewall-cmd --reload

3 Enable kvm_intel nested

If Enable kvm_intel nested, you can create nested virtual machine on virtual machine.

> echo "options kvm_intel nested=1" | \
  sudo tee -a /etc/modprobe.d/kvm.conf
> sudo reboot

4 Run virt-manager

You can manage virtual machines via GUI with virt-manager. For managing virtual machines via CUI, use virsh and virt-install.

> virt-manager

0001_virt-manager.png