Dev.to Security 🔐 Cybersecurity 👁 0 📖 4 min read

Kali Linux on Apple Silicon

Kali Linux on Apple Silicon (M2 MacBook Air) — Complete VM Setup Guide This guide provides a step-by-step walkthrough for configuring and running Kali Linux as an ARM64 virtual machine on an M2 MacBook Air (16 GB Unifi

Kali Linux on Apple Silicon (M2 MacBook Air) — Complete VM Setup Guide

This guide provides a step-by-step walkthrough for configuring and running Kali Linux as an ARM64 virtual machine on an M2 MacBook Air (16 GB Unified Memory, 256 GB SSD).

1. Storage & Resource Sizing (256 GB SSD Strategy)

Because a 256 GB internal drive has limited headroom alongside macOS system data and caching, disk allocation must balance functionality with host drive health:

Resource Recommended Value Notes
Virtual Disk Size 30 GB to 40 GB Set to Dynamic / Thin Provisioning (only consumes actual space used, initially ~10–12 GB).
Installer / Download 3 GB to 4 GB Can be deleted immediately after installation is complete.
RAM Allocation 4 GB to 6 GB Leaves 10–12 GB for macOS Sonoma/Sequoia; perfect for smooth multi-tasking.
CPU Cores 4 vCPUs M2 has 4 performance + 4 efficiency cores; 4 vCPUs provides near-native responsiveness.

Storage Warning: Do not pre-allocate fixed disk space. Always ensure sparse / dynamic disk allocation is checked so your VM grows only as tools and packages are installed.

2. Choosing the Hypervisor: UTM vs. VMware Fusion

For Apple Silicon (ARM64), UTM is the recommended open-source hypervisor:

  • Uses Apple's native Hypervisor virtualization framework.
  • Officially supported with ready-to-run Kali ARM64 images.
  • Zero license fees, active community, and native SPICE tools for copy/paste and dynamic resolution.

Alternative: VMware Fusion Pro (now free for personal use) is also viable, but UTM provides the smoothest out-of-the-box experience with Kali's pre-packaged ARM64 builds.

3. Installation: Method A (Pre-Built UTM Image — Recommended)

Offensive Security provides officially tuned UTM images for Apple Silicon. This avoids manual installer partitioning and driver quirks.

Step 1: Download Prerequisites

  1. Download and install UTM from mac.getutm.app (free download from the website).
  2. Go to kali.org/get-kali/#kali-virtual-machines.
  3. Select the Apple Silicon (ARM64) tab.
  4. Download the UTM package (a .7z archive, ~2.5–3.5 GB).

Step 2: Extract and Import

  1. Install an unarchiver that handles 7z (e.g., Keka or via terminal: brew install p7zip).
  2. Extract the downloaded archive:
   7z x kali-linux-*-utm-arm64.7z
  1. You will get a .utm package (e.g., kali-linux-202x.x-utm.utm).
  2. Double-click the .utm file or open UTM, click Open VM, and select the extracted .utm package.

Step 3: Default Credentials & First Boot

  1. In the UTM sidebar, select the Kali VM and click the Play button.
  2. Default login credentials:
    • Username: kali
    • Password: kali

4. Installation: Method B (Fresh ISO Installer — Custom Control)

If you prefer full control over disk partitions and tool metapackages:

Step 1: Download Kali ARM64 Installer

  1. Visit kali.org/get-kali/#kali-installer-images.
  2. Select Apple Silicon (ARM64).
  3. Download the Installer ISO image (kali-linux-*-installer-arm64.iso).

Step 2: Create VM in UTM

  1. Open UTM and click + (Create a New Virtual Machine).
  2. Select Virtualize (do not select Emulate; virtualization runs at native M2 speed).
  3. Select Linux.
  4. Check Use Apple Virtualization (or standard QEMU; standard QEMU provides better snapshot support).
  5. Under Boot ISO Image, browse and choose the downloaded Kali ARM64 ISO.
  6. Configure Hardware:
    • Memory: 4096 MB (4 GB) or 6144 MB (6 GB).
    • CPU Cores: 4.
  7. Configure Storage:
    • Size: 35 GB (leave dynamic allocation enabled).
  8. Leave Shared Directory as default for now, review settings, and click Save.

Step 3: Run the Installation

  1. Start the VM. Choose Graphical Install at the boot menu.
  2. Set Language, Region, and Keymap.
  3. Configure hostname (kali) and user account credentials.
  4. Partitioning: Choose Guided - use entire disk -> All files in one partition.
  5. Software Selection:
    • Keep default desktop environment: Xfce (lightweight, minimal RAM).
    • Select default top 10 tools. Avoid selecting everything or large on a 256 GB drive.
  6. Complete the installation and reboot. Remove the ISO from the CD/DVD drive in UTM settings under Drives.

5. Post-Installation Configuration

1. Update Repositories & Packages

Open a terminal inside Kali:

sudo apt update && sudo apt upgrade -y

2. Enable Clipboard Sharing & Auto-Resolution (SPICE Agent)

If using QEMU backend in UTM, ensure the SPICE guest tools are active:

sudo apt install -y spice-vdagent spice-webdavd
sudo systemctl enable --now spice-vdagent

Verification: Resize the UTM window on your Mac. The Kali desktop should automatically adjust resolution to match.

3. Change Default Passwords

Protect your instance:

passwd

6. Keeping Disk Usage Lean on a 256 GB Mac

With a 256 GB SSD, saving storage is essential:

  1. Clean Package Cache regularly:
   sudo apt clean
   sudo apt autoremove --purge -y
  1. Install Only What You Need: Instead of installing the bloated kali-linux-everything (which takes >30 GB), install specific tool suites on demand:
    • Web testing: sudo apt install -y kali-tools-web
    • Wireless auditing: sudo apt install -y kali-tools-wireless
    • Reverse engineering: sudo apt install -y kali-tools-reverse-engineering
  2. Delete ISO / Archive Files from macOS: Delete the .iso or .7z file in ~/Downloads after installation to instantly reclaim ~3.5 GB.
  3. UTM Disk Reclaim: When files are deleted inside Kali, run sudo fstrim -av to inform the hypervisor to trim unused blocks.

7. Troubleshooting Common Apple Silicon Issues

Problem Root Cause Solution
Black screen on boot Display backend mismatch In UTM settings -> Display -> Change Emulated Display Card to virtio-gpu-pci or virtio-ramfb.
No Internet in VM Network adapter mode In VM settings -> Network -> Ensure Mode is set to Shared (NAT).
Cursor stutter or desync Missing tablet input In VM settings -> Input -> Set mouse to USB Tablet or install spice-vdagent.
Shared Folder not mounting WebDAV service inactive Run davfs2 or use UTM's built-in VirtFS mount: sudo mount -t 9p -o trans=virtio share /mnt/shared.
📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.