Home KVM Install And Configure KVM In OpenSUSE Tumbleweed

Install And Configure KVM In OpenSUSE Tumbleweed

By sk
Published: Updated: 17.7K views

In this step by step guide, I will walk you through the steps to install and configure KVM in OpenSUSE Tumbleweed desktop.

Prerequisites

Before installing KVM, first make sure your system supports hardware virtualization. We have documented a few different ways to find if a Linux system supports Virtualization in the following guide.

If your system supports hardware virtualization, go ahead and setup KVM virtualization server on your openSUSE system as described in the subsequent steps.

Install and configure KVM in openSUSE Tumbleweed

For the purpose of this guide, I will be using the following system:

KVM virtualization server:

  • OS – openSUSE Tumbleweed desktop
  • IP Address : 192.168.29.72/24

Install KVM in openSUSE Tumbleweed

I personally tested this guide on the latest openSUSE Tumbleweed version. I believe this will work on Leap edition as well.

Setting up a virtualization environment in openSUSE is very easy and straight-forward.

If you prefer command line way, just run the following command to install KVM server and KVM tools in openSUSE:

$ sudo zypper install -t pattern kvm_server kvm_tools

You can also install KVM using YaST. YaST is the graphical installation and configuration tool for openSUSE. It simplified the installation of KVM hypervisor in openSUSE.

Open YaST and head to the "Virtualization" section on the left pane and click "Install Hypervisor and Tools" option on the right pane.

Install Hypervisor and tools from Yast in opensuse
Install Hypervisor and tools from Yast in opensuse

A new window will pop up. Choose both KVM server and KVM tools under the KVM Hypervisor section. The KVM server provides only the minimal system to get a running system. In order to configure, manage and monitor KVM virtual machines, you must choose KVM tools option as well. After choosing both options, Click Accept to continue:

Install kvm server and kvm tools in opensuse tumbleweed
Install kvm server and kvm tools in opensuse tumbleweed

KVM installation will begin shortly. Once the installation is about to complete, you will be notified to configure bridge networking manually. Click OK to close the notification message.

A notification message to configure bridge networking in opensuse
A notification message to configure bridge networking

Upon successful installation, you will see the following message:

Kvm server and Kvm tools are installed in opensuse
Kvm server and Kvm tools are installed in opensuse

Next, enable and start libvirtd service using commands:

$ sudo systemctl enable libvirtd
$ sudo systemctl start libvirtd

You can also combine both commands and run them as an one-liner like below:

$ sudo systemctl enable --now libvirtd

Check the status of libvirtd service with command:

$ systemctl status libvirtd

Sample output:

● libvirtd.service - Virtualization daemon
      Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
      Active: active (running) since Sat 2021-04-24 14:06:40 IST; 3s ago
 TriggeredBy: ● libvirtd-ro.socket
              ● libvirtd-admin.socket
              ● libvirtd.socket
        Docs: man:libvirtd(8)
              https://libvirt.org
    Main PID: 16885 (libvirtd)
       Tasks: 19 (limit: 32768)
         CPU: 234ms
      CGroup: /system.slice/libvirtd.service
              └─16885 /usr/sbin/libvirtd --timeout 120
Enable and start libvertd service in opensuse
Enable and start libvertd service in opensuse

As you see in the above output, libvirtd service is up and running!

Congratulations! Our openSUSE system is now ready to deploy KVM virtual machines!

Create and Manage KVM Guest Machines

We can create and manage KVM virtual machines either from command line using virsh command or using any graphical KVM management tools like Cockpit and Virt-manager. Refer the following guides to know how to manage KVM guests using these tools.

Enable Virsh Console Access for Virtual Machines

After creating the KVM guests, I can be able to access them via SSH, VNC client, Virt-viewer, Virt-manager and Cockpit web console etc. But I couldn't access them using "virsh console" command. In order to access KVM guests using "virsh console", we should enable it as described in the following guide:

Hope this helps.

Resource:

You May Also Like

1 comment

papi July 30, 2023 - 3:26 am

Maybe you should add also installing libvirt package.. the libvirt daemon didnt even exist when I tried to enable it

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More