Server

Version: 24.03 LTS SP2

Installing on QEMU

Firmware

Standard EFI Firmware

Download the following binaries from the download page:

text
RISCV_VIRT_CODE.fd
RISCV_VIRT_VARS.fd

Alternatively, compile the latest EDK2 OVMF firmware locally according to the official documentation

EFI Firmware with Penglai TEE Support

Download the following binary from the download page:

text
fw_dynamic_oe_2403_penglai.bin

QEMU Version

To support UEFI, QEMU version 8.1 or above is required.

During compilation, the libslirp dependency needs to be installed (package name varies by distribution, for openEuler it's libslirp-devel) and the --enable-slirp parameter should be added.

bash
~$ qemu-system-riscv64 --version
QEMU emulator version 8.2.2
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

qcow2 Image

Obtain the ISO file (e.g., openEuler-24.03-LTS-SP1-riscv64.qcow2.xz)

bash
~$ ls *.qcow2.xz
openEuler-24.03-LTS-SP1-riscv64.qcow2.xz

Getting the Startup Script

Obtain the startup script from the download page:

  • start_vm.sh: Default script, requires manual installation of the desktop environment.
  • start_vm_penglai.sh: Script supporting Penglai TEE functionality.

Script Parameters:

  • ssh_port: Local SSH forwarding port, default is 12055.
  • vcpu: Number of threads for QEMU execution, default is 8 cores, adjustable as needed.
  • memory: Amount of memory allocated for QEMU execution, default is 8GiB, adjustable as needed.
  • fw: Firmware payload for booting.
  • drive: Path to the virtual disk, adjustable as needed.
  • bios (optional): Boot firmware, can be used to load firmware enabled with Penglai TEE.

Creating a Virtual Hard Disk File

Create a new virtual hard disk file, in the example below, the size of the virtual hard disk is 40GiB.

Do not use qcow2 virtual hard disk files that already contain data to avoid unexpected situations during the boot process.

Ensure that there is only one qcow2 virtual hard disk file in the current directory to avoid errors in script recognition.

bash
~$ qemu-img create -f qcow2 qemu.qcow2 40G