Kali Linux on UTM

  • Choose Apple Virtualization Framework while creating VM
  • Choose Networking mode as Bridged (Advanced)
  • Display
    • Turn off Dynamic Resolution and HiDPI mode
  • Sharing Folder: ~/Documents/UTM/share
  • Disk Size:
    • Default 64 GB
    • Used 14 GB by System
    • Maybe ~30 GB can be better
  • Delete ISO Disk
  • Run the following command to fix keyboard mouse copy paste
sudo apt install -y spice-vdagent qemu-guest-agent
  • Kali Config
    • Display Resolution: 1440x900
    • Mouse: Change scroll direction of spice vdagent tablet
  • Mounting Folder
    • VirtioFS is a shared file system natively used by Apple Virtualization Framework
    • UTM defaults the tag name as share
sudo mkdir -p /mnt/virtio_share
sudo mkdir -p /media/MacShare
 
sudo mount -t virtiofs -o dax=never share /mnt/virtio_share
sudo mount --bind /mnt/virtio_share/share /media/MacShare
  • Make mounting automatic
sudo nano /etc/fstab
# add the following at the end of the file
share    /mnt/virtio_share    virtiofs    defaults,dax=never,nofail    0    0
/mnt/virtio_share/share    /media/MacShare    none    bind,nofail    0    0
 
# check if mounting works
sudo systemctl daemon-reload
sudo mount -a

Extra troubleshoot

  • Add a serial device from settings to show a separate terminal
  • Run following command to fix network
sudo dhcpcd eth0
/usr/share/icons/hicolor/256x256/emblems/emblem-kali.png
/usr/share/icons/hicolor/scalable/emblems/emblem-kali.svg