LTS

    Innovation Version

      Installing Virtualization Components

      This chapter describes how to install virtualization components in openEuler.

      Minimum Hardware Requirements

      The minimum hardware requirements for installing virtualization components on openEuler are as follows:

      • AArch64 processor architecture: ARMv8 or later, supporting virtualization expansion
      • x86_64 processor architecture, supporting VT-x
      • 2-core CPU
      • 4 GB memory
      • 16 GB available disk space

      Installing Core Virtualization Components

      Installation Methods

      Prerequisites

      • The Yum source has been configured. For details, see the openEuler 22.03 LTS SP1 Administrator Guide.
      • Only the administrator has permission to perform the installation.

      Procedure

      1. Install the QEMU component.

        # yum install -y qemu
        
      2. Install the libvirt component.

        # yum install -y libvirt
        
      3. Start the libvirtd service.

        # systemctl start libvirtd
        

      NOTE: The KVM module is integrated in the openEuler kernel and does not need to be installed separately.

      Verifying the Installation

      1. Check whether the kernel supports KVM virtualization, that is, check whether the /dev/kvm and /sys/module/kvm files exist. The command and output are as follows:

        # ls /dev/kvm
        /dev/kvm
        
        # ls /sys/module/kvm
        parameters  uevent
        

        If the preceding files exist, the kernel supports KVM virtualization. If the preceding files do not exist, KVM virtualization is not enabled during kernel compilation. In this case, you need to use the Linux kernel that supports KVM virtualization.

      2. Check whether QEMU is successfully installed. If the installation is successful, the QEMU software package information is displayed. The command and output are as follows:

        $ rpm -qi qemu
        Name        : qemu
        Epoch       : 10
        Version     : 6.2.0
        Release     : 65.oe2203sp1
        Architecture: x86_64
        Install Date: Thu 11 May 2023 12:09:25 AM CST
        Group       : Unspecified
        Size        : 21829066
        License     : GPLv2 and BSD and MIT and CC-BY-SA-4.0
        Signature   : RSA/SHA256, Tue 27 Dec 2022 11:19:34 PM CST, Key ID 007fb747fb37bc6f
        Source RPM  : qemu-6.2.0-65.oe2203sp1.src.rpm
        Build Date  : Tue 27 Dec 2022 05:51:21 PM CST
        Build Host  : dc-64g.compass-ci
        URL         : http://www.qemu.org
        Summary     : QEMU is a generic and open source machine emulator and virtualizer
        Description :
        QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed.
        
        QEMU has two operating modes:
        
           Full system emulation. In this mode, QEMU emulates a full system (for example a PC),
           including one or several processors and various peripherals. It can be used to launch
           different Operating Systems without rebooting the PC or to debug system code.
        
           User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU.
           It can be used to launch the Wine Windows API emulator (https://www.winehq.org) or to ease
           cross-compilation and cross-debugging.
        You can refer to https://www.qemu.org for more infortmation.
        
      3. Check whether libvirt is successfully installed. If the installation is successful, the libvirt software package information is displayed. The command and output are as follows:

        $ rpm -qi libvirt
        Name        : libvirt
        Version     : 6.2.0
        Release     : 49.oe2203sp1
        Architecture: x86_64
        Install Date: Thu 11 May 2023 12:10:05 AM CST
        Group       : Unspecified
        Size        : 0
        License     : LGPLv2+
        Signature   : RSA/SHA256, Tue 27 Dec 2022 10:52:12 PM CST, Key ID 007fb747fb37bc6f
        Source RPM  : libvirt-6.2.0-49.oe2203sp1.src.rpm
        Build Date  : Tue 27 Dec 2022 06:01:20 PM CST
        Build Host  : dc-64g.compass-ci
        URL         : https://libvirt.org/
        Summary     : Library providing a simple virtualization API
        Description :
        Libvirt is a C toolkit to interact with the virtualization capabilities
        of recent versions of Linux (and other OSes). The main package includes
        the libvirtd server exporting the virtualization support.
        
      4. Check whether the libvirt service is started successfully. If the service is in the Active state, the service is started successfully. You can use the virsh command line tool provided by the libvirt. The command and output are as follows:

        # systemctl status libvirtd
        ● libvirtd.service - Virtualization daemon
           Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
           Active: active (running) since Tue 2019-08-06 09:36:01 CST; 5h 12min ago
             Docs: man:libvirtd(8)
                   https://libvirt.org
         Main PID: 40754 (libvirtd)
            Tasks: 20 (limit: 32768)
           Memory: 198.6M
           CGroup: /system.slice/libvirtd.service
                   ─40754 /usr/sbin/libvirtd
        

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.

      PR

      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.

      Usability

      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.

      Correctness

      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Submit
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份