2026 11 15 Rust Vm Setup
directory structure:
vm
└── kernel
├── dev
│ ├── debian-13.7.0-arm64-netinst.iso
│ ├── debian-dev.qcow2
│ ├── efi-code.fd
│ └── efi-vars.fd
├── shared
└── testPopulate the directories:
cd ~/vm/kernel/dev
qemu-img create -f qcow2 debian-dev.qcow2 100G
QEMU_SHARE="$(brew --prefix qemu)/share/qemu"
cp "$QEMU_SHARE/edk2-aarch64-code.fd" ./efi-code.fd
cp "$QEMU_SHARE/edk2-arm-vars.fd" ./efi-vars.fdThe vm installation command:
qemu-system-aarch64 \
-name rust-linux-dev \
-machine virt,highmem=on \
-accel hvf \
-cpu host \
-smp 6 \
-m 8192 \
-drive if=pflash,format=raw,readonly=on,file=efi-code.fd \
-drive if=pflash,format=raw,file=efi-vars.fd \
-drive if=none,file=debian-dev.qcow2,format=qcow2,id=hd0 \
-device virtio-blk-pci,drive=hd0 \
-device qemu-xhci,id=xhci \
-device usb-kbd,bus=xhci.0 \
-drive if=none,file=debian-13.7.0-arm64-netinst.iso,format=raw,media=cdrom,id=cd0 \
-device usb-storage,bus=xhci.0,drive=cd0 \
-device virtio-gpu-pci \
-display cocoa \
-netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22 \
-device virtio-net-pci,netdev=net0 \
-device virtio-rng-pciTroubleshooting normal vm commamnd: