Crates.io | axvmconfig |
lib.rs | axvmconfig |
version | 0.1.0 |
created_at | 2025-08-14 09:20:25.147234+00 |
updated_at | 2025-08-14 09:20:25.147234+00 |
description | A simple VM configuration tool for ArceOS-Hypervisor. |
homepage | https://github.com/arceos-hypervisor/axvmconfig |
repository | |
max_upload_size | |
id | 1794656 |
size | 135,505 |
axvmconfig is a Virtual Machine configuration tool and library for AxVisor. It supports parsing, validating, and generating TOML configuration files for ArceOS virtual machines, enabling users to quickly deploy and manage VMs across multiple architectures. [Work in Progress]
axvmconfig check --config-path path/to/config.toml
# Basic usage
axvmconfig generate -a riscv64 -k arceos-riscv64.bin -l 0x80200000
# Complete example with all options
axvmconfig generate \
-a aarch64 \
-i 1 \
-n "MyVM" \
-t 1 \
-c 2 \
-e 0x40080000 \
-k arceos-aarch64.bin \
-l 0x40080000 \
--image-location fs \
--cmdline "console=ttyS0" \
-O output/
-a --arch: Target architecture (riscv64/aarch64/x86_64)
-i --id: VM ID (default: 0)
-n --name: VM name (default: "GuestVM")
-t --vm-type: VM type (0=HostVM, 1=RTOS, 2=Linux, default: 1)
-c --cpu-num: Number of CPUs (default: 1)
-e --entry-point: Entry point address (default: 1)
-k --kernel-path: Kernel image path
-l --kernel-load-addr: Kernel load address
--image-location: Image location ("fs"|"memory", default: "fs")
--cmdline: Kernel command line arguments
-O --output: Output directory
-h, --help: Print help
[base]
id = 1
name = "GuestVM-riscv64"
vm_type = 1
cpu_num = 1
phys_cpu_sets = [1]
[kernel]
entry_point = 0x80200000
kernel_path = "arceos-riscv64.bin"
kernel_load_addr = 0x80200000
image_location = "fs"
# Memory regions format: [base_addr, size, flags, type]
memory_regions = [
[0x80000000, 0x1000000, 0x7, 1] # 16M RAM
]
[devices]
# Emulated devices format: [name, base_gpa, length, irq_id, emu_type, config_list]
emu_devices = []
# Passthrough devices format: [name, base_gpa, base_hpa, length, irq_id]
passthrough_devices = [
["PLIC@c000000", 0x0c000000, 0x0c000000, 0x210000, 0x1],
["UART@10000000", 0x10000000, 0x10000000, 0x1000, 0x1],
]
# Interrupt modes: no_irq | emulated | passthrough
interrupt_mode = "no_irq"
no_irq
: No interrupt handlingemulated
: Use emulated interrupt controllerpassthrough
: Use passthrough interrupt controllerThe project includes pre-built templates for supported architectures:
templates/riscv64.toml
- RISC-V 64-bit configurationtemplates/aarch64.toml
- ARM64 configurationtemplates/x86_64.toml
- x86_64 configurationContributions are welcome! Please ensure that:
cargo test
)cargo fmt
)cargo clippy
)This project is licensed under multiple licenses: