Skip to content

Instantly share code, notes, and snippets.

@temp3l
Last active January 15, 2025 01:32
Show Gist options
  • Save temp3l/83759cbc627766c2d5e986d8322b6c41 to your computer and use it in GitHub Desktop.
Save temp3l/83759cbc627766c2d5e986d8322b6c41 to your computer and use it in GitHub Desktop.
qemu macos starter
disk=/Users/steph/workspace/qemu/images/kali-linux-2024.3-qemu-amd64.qcow2
#cdrom=/Users/steph/workspace/qemu/iso/kali-linux-2024.3-installer-arm64.iso
cdrom=kali-linux-2024.3-installer-netinst-arm64.iso
kernel=vmlinuz-2.6.32-5-versatile
initrd=initrd.gz
# https://theboreddev.com/run-ubuntu-on-mac-using-qemu/
# netboo kernel: https://archive.debian.org/debian/dists/squeeze/main/installer-armel/current/images/
qemu-system-aarch64 \
-nographic \
-M virt,highmem=off \
-accel hvf \
-cpu host \
-smp 4 \
-m 3000 \
-bios QEMU_EFI.fd \
-device virtio-gpu-pci \
-device qemu-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda \
-device hda-duplex \
-hda "$disk" \
-cdrom "$cdrom"
disk=/Users/steph/workspace/qemu/images/kali-linux-2024.3-qemu-amd64.qcow2
cdrom=kali-linux-2024.3-installer-netinst-arm64.iso
kernel=boot/vmlinuz
initrd=boot/initrd.img
bios=QEMU_EFI.fd
# sudo aptitude install kali-defaults lightdm x11vnc net-utils
# -spice port=5911,disable-ticketing=on \
# -netdev user,id=net0,hostfwd=tcp::2222-:22 \
# -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
qemu-system-aarch64 \
-nographic \
-M virt \
-accel hvf \
-cpu host \
-smp 8 \
-m 8000 \
-bios "$bios" \
-device virtio-gpu-pci \
-device qemu-xhci \
-device usb-kbd \
-device usb-tablet \
-append "root=/dev/mapper/kali--vg-root ro verbose" \
-kernel $kernel -initrd $initrd \
-boot menu=on \
-drive file="$disk",if=none,cache=none,id=hd0 \
-device virtio-blk-pci,drive=hd0 \
-cdrom "$cdrom" \
-netdev user,id=net0,hostfwd=tcp::8080-:8080 -device virtio-net-pci,netdev=net0 \
-display none \
-device ich9-usb-ehci1,id=usb \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,multifunction=on \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4 \
-chardev spicevmc,name=usbredir,id=usbredirchardev1 \
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1 \
-chardev spicevmc,name=usbredir,id=usbredirchardev2 \
-device usb-redir,chardev=usbredirchardev2,id=usbredirdev2 \
-chardev spicevmc,name=usbredir,id=usbredirchardev3 \
-device usb-redir,chardev=usbredirchardev3,id=usbredirdev3 \
-vnc 0.0.0.0:1,password=off,websocket=5700 -k de \
-nographic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment