From 0116adc42216a9cdb660897941b01d51bdea64ff Mon Sep 17 00:00:00 2001 From: ZCShou <72115@163.com> Date: Fri, 26 Sep 2025 06:31:35 +0000 Subject: [PATCH] update README --- README.md | 24 ++++++++++-------------- README_CN.md | 24 ++++++++++-------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 0f076e35..469de2cd 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,16 @@ If necessary, you may also need to install [musl-gcc](http://musl.cc/x86_64-linu ## Configuration Files -Since configuring the guest is a complex process, AxVisor chooses to use TOML files to manage the guest configurations. These configurations include the virtual machine ID, virtual machine name, virtual machine type, number of CPU cores, memory size, virtual devices, passthrough devices, and more. In the source code, the `./config/vms` directory contains some example templates for guest configurations. +Since guest configuration is a complex process, AxVisor chooses to use toml files to manage guest configurations, which include the virtual machine ID, virtual machine name, virtual machine type, number of CPU cores, memory size, virtual devices, and passthrough devices. -In addition, you can use the [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) tool to generate a custom configuration file. For detailed information, refer to the [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html) documentation. +- In the source code's `./config/vms` directory, there are some example templates for guest configurations. The configuration files are named in the format `--board_or_cpu-smpx`, where: + - `` is the guest operating system name + - `` is the architecture + - `board_or_cpu` is the name of the hardware development board or CPU (different strings are concatenated with `_`) + - `smpx` refers to the number of CPUs allocated to the guest, where `x` is the specific value + - The different components are concatenated with `-` to form the whole name -The configuration file naming format is `--board_or_cpu-smpx`, where `` is the guest system name, `` is the architecture, `board_or_cpu` is the hardware development board or CPU name (concatenating different strings with `_`), and `smpx` indicates the number of CPUs allocated to the guest, with `x` being the specific value. Each component is concatenated with `-` to form the complete name. +- Additionally, you can also use the [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) tool to generate a custom configuration file. For detailed information, please refer to [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html). ## Load and run from file system @@ -85,18 +90,9 @@ Loading from the filesystem refers to the method where the AxVisor image, Linux ./scripts/nimbos.sh --arch aarch64 ``` -2. Execute `./axvisor.sh defconfig` to set up the development environment and generate AxVisor config `.hvconfig.toml`. +2. Execute `./axvisor.sh run --plat aarch64-generic --features fs,ept-level-4 --arceos-args BUS=mmio,BLK=y,DISK_IMG=tmp/nimbos-aarch64.img,LOG=info --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml` to build AxVisor and start it in QEMU. -3. Edit the `.hvconfig.toml` file to set the `vmconfigs` item to the path of your guest configuration file, for example: - - ```toml - plat = "aarch64-generic" - features = ["fs", "ept-level-4"] - arceos_args = [ "BUS=mmio","BLK=y", "DISK_IMG=tmp/nimbos-aarch64.img", "LOG=info"] - vmconfigs = [ "configs/vms/nimbos-aarch64.toml",] - ``` - -4. Execute `./axvisor.sh run` to build AxVisor and start it in QEMU. +3. After that, you can directly run `./axvisor.sh run` to start it, and modify `.hvconfig.toml` to change the startup parameters. ### More guest diff --git a/README_CN.md b/README_CN.md index 93f5fd18..37cd0102 100644 --- a/README_CN.md +++ b/README_CN.md @@ -67,11 +67,16 @@ cargo install cargo-binutils ## 配置文件 -由于客户机配置是一个复杂的过程,AxVisor 选择使用 toml 文件来管理客户机的配置,其中包括虚拟机 ID、虚拟机名称、虚拟机类型、CPU 核心数量、内存大小、虚拟设备和直通设备等。在源码的 `./config/vms` 目录下是一些客户机配置的示例模板. +由于客户机配置是一个复杂的过程,AxVisor 选择使用 toml 文件来管理客户机的配置,其中包括虚拟机 ID、虚拟机名称、虚拟机类型、CPU 核心数量、内存大小、虚拟设备和直通设备等。 -此外,也可以使用 [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) 工具来生成一个自定义配置文件。详细介绍参见 [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html)。 +- 在源码的 `./config/vms` 目录下是一些客户机配置的示例模板,配置文件命名格式为 `--board_or_cpu-smpx`,其中 + - `` 是客户机系统名字 + - `` 是架构 + - `board_or_cpu` 硬件开发板或者 CPU 的名字(以 `_` 拼接不同字符串) + - `smpx` 是指分配客户机的 CPU 数量 `x` 为具体数值 + - 各项之间以 `-` 拼接为整体 -配置文件命名格式为 `--board_or_cpu-smpx`,其中,`` 是客户机系统名字,`` 是架构,`board_or_cpu` 硬件开发板或者 CPU 的名字(以 `_` 拼接不同字符串),`smpx` 是指分配客户机的 CPU 数量 `x` 为具体数值,各项之间以 `-` 拼接为整体。 +- 此外,也可以使用 [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) 工具来生成一个自定义配置文件。详细介绍参见 [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html)。 ## 从文件系统加载运行 @@ -85,18 +90,9 @@ cargo install cargo-binutils ./scripts/nimbos.sh --arch aarch64 ``` -2. 执行 `./axvisor.sh defconfig` 以设置开发环境并生成 AxVisor 配置文件 `.hvconfig.toml`。 +2. 执行 `./axvisor.sh run --plat aarch64-generic --features fs,ept-level-4 --arceos-args BUS=mmio,BLK=y,DISK_IMG=tmp/nimbos-aarch64.img,LOG=info --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml` 构建 AxVisor 并在 QEMU 中启动 NimbOS 客户机。 -3. 编辑生成的 `.hvconfig.toml`,将 `vmconfigs` 项设置为指向 NimbOS 的客户机配置文件,例如: - - ```toml - plat = "aarch64-generic" - features = ["fs", "ept-level-4"] - arceos_args = [ "BUS=mmio","BLK=y", "DISK_IMG=tmp/nimbos-aarch64.img", "LOG=info"] - vmconfigs = [ "configs/vms/nimbos-aarch64.toml",] - ``` - -4. 执行 `./axvisor.sh run` 构建 AxVisor 并在 QEMU 中启动 NimbOS 客户机。 +3. 后续可直接执行 `./axvisor.sh run` 来启动,并可通过修改 `.hvconfig.toml` 来更改启动参数 ### 更多客户机