Index of /M1-Apple/Kali-M1-Qemu/
Name | Last Modified | Size | Type |
../ | | - | Directory |
MANJARO-OLD/ | 2021-Jan-08 22:03:33 | - | Directory |
QEMU_EFI.fd | 2021-Jan-07 23:15:11 | 2.0M | application/octet-stream |
README.txt | 2021-Jan-11 19:35:18 | 2.8K | text/plain; charset=utf-8 |
efi-virtio.rom | 2021-Jan-07 23:15:23 | 157.0K | application/octet-stream |
initrd.img | 2021-Jan-08 22:03:08 | 55.1M | application/octet-stream |
qemu-system-aarch64 | 2021-Jan-07 23:15:52 | 17.9M | application/octet-stream |
run.sh | 2021-Jan-11 21:21:05 | 0.4K | text/x-sh; charset=utf-8 |
varstorage.img | 2021-Jan-11 21:20:05 | 64.0M | application/octet-stream |
vgabios-ramfb.bin | 2021-Jan-07 23:16:25 | 28.0K | application/octet-stream |
vmlinuz | 2021-Jan-08 22:02:52 | 21.6M | application/octet-stream |
---------------------------------------------------------------------------------------
_ __ _ _ _ _ _ ____ ___
| | / / | (_) | | (_) | | / ___| / |
| |/ / __ _| |_ | | _ _ __ _ ___ __ __ _ __ _ _ __ ___| |__ / /___ / /| |
| \ / _` | | | | | | | '_ \| | | \ \/ / / _` |/ _` | '__/ __| '_ \| ___ \/ /_| |
| |\ \ (_| | | | | |___| | | | | |_| |> < | (_| | (_| | | | (__| | | | \_/ |\___ |
\_| \_/\__,_|_|_| \_____/_|_| |_|\__,_/_/\_\ \__,_|\__,_|_| \___|_| |_\_____/ |_/
--------------------------------------------------------------------------------------
Quick and dirty way how to run this on the patched qemu (Alexander Graf)
For building qemu from source please refer to the following article
https://forums.macrumors.com/threads/success-virtualize-windows-10-for-arm-on-m1-with-alexander-grafs-qemu-hypervisor-patch.2272354/
What we will need
------------------
- Compiled and patched qemu-system-aarch64
- QEMU_EFI.fd
- efi-virtio.rom
- vgabios-ramfb.bin
- varstorage.img (not really needed but can be used for storing settings from UEFI)
- initrd.img (Kali initrd from current kernel as of 01.07.2021)
- vmlinuz (Kali kernel from current release as of 01.07.2021)
- disk.img (this is an extracted Kali Linux aarch64 Pinebookpro image )
Get Kali from here (can be other aarch64 images I guess - I have used this one )
https://images.kali.org/arm-images/kali-linux-2020.4-pinebook-pro.img.xz
Extract and rename
$ unxz kali-linux-2020.4-pinebook-pro.img.xz
$ mv kali-linux-2020.4-pinebook-pro.img disk.img
We can expand the image via qemu-img to expand it later with gparted or something (but Im not sure how to do this on a Mac)
$ qemu-img resize disk.img 20G
The final image is roughly 11 GB big and you will have around 1 GB disk space free once you boot Kali which
should be sufficient for standard tests (unless you plan to move gigs of data ... consider adding a second qemu disk or expand the image)
Here is the launcher script
---------------------------
./qemu-system-aarch64 \
-M virt \
-m 4G \
-accel hvf \
-smp 2 \
-cpu max \
-device ramfb \
-device qemu-xhci \
-device usb-kbd \
-device usb-mouse \
-device usb-tablet \
-device virtio-blk,drive=drive \
-drive if=none,id=drive,format=raw,file=disk.img \
-drive file=varstorage.img,if=pflash,index=1 \
-net nic,model=virtio \
-net user,hostfwd=tcp::2222-:22 \
-kernel vmlinuz -append root=/dev/vda1 -initrd initrd.img \
-bios QEMU_EFI.fd
You can then boot it (save the above as a shell script and place in the Kali working directory with other files)
- Enjoy
If you have question ping me @ twitter/astr0baby
Video demo and some tips https://www.youtube.com/watch?v=XDZoqdeZo_0