长期支持版本

    安装虚拟化

    本章介绍在openEuler中安装虚拟化组件的方法。

    最低硬件要求

    在openEuler系统中安装虚拟化组件,最低硬件要求:

    • AArch64处理器架构:ARMv8以上并且支持虚拟化扩展
    • x86_64处理器架构:支持VT-x
    • 2核CPU
    • 4GB的内存
    • 16GB可用磁盘空间

    安装虚拟化核心组件

    安装方法

    前提条件

    安装步骤

    1. 安装QEMU组件。

      # yum install -y qemu
      
    2. 安装libvirt组件。

      # yum install -y libvirt
      
    3. 启动libvirtd服务。

      # systemctl start libvirtd
      

    说明:
    KVM模块已经集成在openEuler内核中,因此不需要单独安装。

    验证安装是否成功

    1. 查看内核是否支持KVM虚拟化,即查看/dev/kvm和/sys/module/kvm文件是否存在,命令和回显如下:

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

      若上述文件存在,说明内核支持KVM虚拟化。若上述文件不存在,则说明系统内核编译时未开启KVM虚拟化,需要更换支持KVM虚拟化的Linux内核。

    2. 确认QEMU是否安装成功。若安装成功则可以看到QEMU软件包信息,命令和回显如下:

      $ rpm -qi qemu
      Name        : qemu
      Epoch       : 10
      Version     : 6.2.0
      Release     : 76.oe2203sp2
      Architecture: aarch64
      Install Date: Tue 15 Aug 2023 09:04:47 PM CST
      Group       : Unspecified
      Size        : 26733299
      License     : GPLv2 and BSD and MIT and CC-BY-SA-4.0
      Signature   : RSA/SHA256, Tue 01 Aug 2023 09:28:19 PM CST, Key ID 007fb747fb37bc6f
      Source RPM  : qemu-6.2.0-76.oe2203sp2.src.rpm
      Build Date  : Tue 01 Aug 2023 09:24:00 PM CST
      Build Host  : localhost
      Relocations : (not relocatable)
      URL         : http://www.qemu.org
      Summary     : QEMU is a generic and open source machine emulator and virtualizer
      Description :
      QEMU is a generic and open source processor emulator which achieves a good
      emulation speed by using dynamic translation. QEMU has two operating modes:
      
       * Full system emulation. In this mode, QEMU emulates a full system (for
         example a PC), including a processor 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 Linux processes compiled
         for one CPU on another CPU.
      
      As QEMU requires no host kernel patches to run, it is safe and easy to use.
      
    3. 确认libvirt是否安装成功。若安装成功则可以看到libvirt软件包信息,命令和回显如下:

      $ rpm -qi libvirt
      Name        : libvirt
      Version     : 6.2.0
      Release     : 57.oe2203sp2
      Architecture: aarch64
      Install Date: Tue 30 Jul 2023 04:56:21 PM CST
      Group       : Unspecified
      Size        : 0
      License     : LGPLv2+
      Signature   : RSA/SHA256, Tue 01 Aug 2023 09:28:19 PM CST, Key ID 007fb747fb37bc6f
      Source RPM  : libvirt-6.2.0-57.oe2203sp2.src.rpm
      Build Date  : Tue 01 Aug 2023 09:24:00 PM CST
      Build Host  : 71e8c1ce149f
      Relocations : (not relocatable)
      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. 查看libvirt服务是否启动成功。若服务处于“active”状态,说明服务启动成功,可以正常使用libvirt提供的virsh命令行工具,命令和回显如下:

      $ 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
      

    文档捉虫

    “有虫”文档片段

    问题描述

    提交类型 issue

    有点复杂...

    找人问问吧。

    PR

    小问题,全程线上修改...

    一键搞定!

    问题类型
    规范和低错类

    ● 错别字或拼写错误;标点符号使用错误;

    ● 链接错误、空单元格、格式错误;

    ● 英文中包含中文字符;

    ● 界面和描述不一致,但不影响操作;

    ● 表述不通顺,但不影响理解;

    ● 版本号不匹配:如软件包名称、界面版本号;

    易用性

    ● 关键步骤错误或缺失,无法指导用户完成任务;

    ● 缺少必要的前提条件、注意事项等;

    ● 图形、表格、文字等晦涩难懂;

    ● 逻辑不清晰,该分类、分项、分步骤的没有给出;

    正确性

    ● 技术原理、功能、规格等描述和软件不一致,存在错误;

    ● 原理图、架构图等存在错误;

    ● 命令、命令参数等错误;

    ● 代码片段错误;

    ● 命令无法完成对应功能;

    ● 界面错误,无法指导操作;

    风险提示

    ● 对重要数据或系统存在风险的操作,缺少安全提示;

    内容合规

    ● 违反法律法规,涉及政治、领土主权等敏感词;

    ● 内容侵权;

    您对文档的总体满意度

    非常不满意
    非常满意
    提交
    根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。
    文档捉虫
    编组 3备份