-
Notifications
You must be signed in to change notification settings - Fork 12
VM Test
Alen Jelavic edited this page Dec 2, 2022
·
1 revision
The VM-Test target is used to generate QEMU virtual machine images for two architectures, x86_64 and aarch64, with a specific package set.
To build QEMU virtual machine images using Replica.one, first clone the main repository as described in docs/QUICKSTART.md
.
For x86_64, invoke the build process using make
:
make CTARGET=x86_64-multilib-linux-gnu package_vm-test
For aarch64, invoke the build process using make
:
make CTARGET=aarch64-unknown-linux-gnu package_vm-test
A successful build will generate the following files in the output/ARCH-vm-test
directory:
System.map-6.0.0-ARCH
initramfs-linux.img
rootfs.qcow2
vmlinuz-linux
where ARCH
corresponds to the architecture.
In order to run virtual machines, QEMU support and a QEMU software stack are required on the host:
Using the generated files, starting a virtual machine can be done with the following:
# for x86_64 VM
qemu-system-x86_64 \
-name "vm-test-amd64" \
-m 2048 -smp 2 \
-bios /usr/share/OVMF/OVMF_CODE.fd \
-initrd ./initramfs-linux.img \
-kernel ./vmlinuz-linux \
-append "root=/dev/sda1" \
-drive file=./rootfs.qcow2 \
-monitor stdio
# for aarch64 VM
qemu-system-aarch64 \
-name "vm-test-arm64" \
-machine virt \
-cpu cortex-a57 \
-m 2048 -smp 2 \
-initrd ./initramfs-linux.img \
-kernel ./vmlinuz-linux \
-append "root=/dev/vda1" \
-drive file=./rootfs.qcow2 \
-monitor stdio