我要评分
获取效率
正确性
完整性
易理解

Verifying QEMU

Prerequisites

Download the openEuler image before running the virt-install command to create a VM.

Procedure

  1. Create a VM drive file in QCOW2 format.
    qemu-img create -f qcow2 /home/test1 10G
  2. Create a VM.
    virt-install --name test1 --ram 2048 --vcpu=4 --cdrom=/dev/cdrom --disk path=/home/test1,size=10

    Parameter description:

    • name test1: VM name
    • ram 2048: size of the virtual memory
    • vcpus=4: number of virtual CPUs
    • cdrom=/dev/cdrom: path to which the OS image is mounted, for example, /home/iso/openEuler-20.03-LTS-SP1-everything-aarch64-dvd.iso
    • path=/home/test1: VM file.
    • size=10: file size, in GB.

    After verifying the QEMU component, run the virsh undefine test1 command to delete the VM used for verification.