This repository was archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Qemu
Dom edited this page Aug 7, 2023
·
20 revisions
./qemu-system-aarch64 -nographic -machine virt -cpu host -accel kvm -bios QEMU_EFI.fd -net user,hostfwd=tcp::2222-:22 -net nic -smp cpus=8 -m 4G -net nic -net user,hostfwd=tcp::10021-:22 -drive if=none,file=/root/avocado/data/avocado-vt/images/debian-9.4.0-aarch64_test.qcow2,format=qcow2,id=hd1 -device virtio-blk-pci,drive=hd1,bootindex=0 -drive if=none,file=cloudinit,format=raw,id=hd10 -device virtio-blk-pci,drive=hd10,bootindex=10
ssh debian@127.0.0.1 -p 10021
VM stucks.
07.24
git clone https://gitlab.com/qemu-project/qemu.git code
pushd code
./configure --target-list=aarch64-softmmu --enable-trace-backends=log --enable-debug --enable-debug-info --enable-vnc --disable-lzo --disable-snappy --disable-docs --disable-werror
make -j100
popd
mkdir bin
cd bin
cp ../code/aarch64-softmmu/qemu-system-aarch64 .
Copy some files for qemu from other server.
./qemu-system-aarch64 -nographic -machine virt -cpu host -bios QEMU_EFI.fd -smp cpus=8 -m 4G -net nic -net user,hostfwd=tcp::2222-:22 -enable-kvm -drive if=none,file=debian-12-nocloud-arm64-20230711-1438.qcow2,format=qcow2,id=hd1 -device virtio-blk-pci,drive=hd1,bootindex=0 -drive if=none,file=cloudinit,format=raw,id=hd10 -device virtio-blk-pci,drive=hd10,bootindex=10
qemu-system-aarch64: PMU: KVM_SET_DEVICE_ATTR: Invalid argument
qemu-system-aarch64: failed to set irq for PMU
./run.sh: line 22: 18000 Aborted
Solution:
qemu-system-aarch64 -nographic -machine virt,gic-version=max -drive file=test/flash0.img,format=raw,if=pflash -drive file=test/flash1.img,format=raw,if=pflash -cpu max -smp cpus=2 -m 1G -drive if=none,file=debian-12-nocloud-arm64-20230711-1438.qcow2,format=qcow2,id=hd1 -device virtio-blk-pci,drive=hd1,bootindex=0
VM gets stuck when kvm is enabled.
echo -e '{ "execute": "qmp_capabilities" }\n { "execute": "query-commands", "id": "RAND91" }\n { "execute": "quit" }' | qemu-system-x86_64 -qmp stdio -vnc none -S
Output help message on aarch64 platform
echo -e 'help\nquit' | /home/dom/Qemu/code/qemu_6.2/build/qemu-system-x86_64 -monitor stdio -vnc none -S
Output error on aarch64 platform:
echo -e 'help\nquit' | /home/dom/Qemu/code/qemu_6.2/build/qemu-system-aarch64 -monitor stdio -vnc none -S
return:
qemu-system-aarch64: No machine specified, and there is no default
Use -machine help to list supported machines
Solution:
echo -e 'help\nquit' | /home/dom/Qemu/code/qemu_6.2/build/qemu-system-aarch64 -machine none -monitor stdio -vnc none -S