Skip to content
Kei Kamikawa edited this page Nov 2, 2022 · 10 revisions

The Virtualization framework can run Linux VMs on a Mac with Apple silicon, and on an Intel-based Mac. The Linux ISO image you download must support the CPU architecture of your Mac.

  • A Mac with Apple silicon
    • Download a Linux ISO image for ARM, which is usually indicated by aarch64 or arm64 in the image filename.
  • An Intel-based Mac
    • Download a Linux ISO image for Intel-compatible CPUs, which is usually indicated by x86_64 or amd64 in the image filename.

If you need to run Intel Linux binaries in ARM Linux on a Mac with Apple silicon, the Virtualization framework supports this capability using the Rosetta translation environment in macOS 13 and later. For more information, see Running Intel Binaries in Linux VMs with Rosetta.

Linux Kernel Requirements

You need PCI support in any case as the Virtio devices are on the PCI bus. It can be supported by enabling CONFIG_VIRTIO_PCI within the kernel (not as a module).

  • Serial console needs console=hvc0 kernel parameter and your Linux kernel is required to enable CONFIG_VIRTIO_CONSOLE and CONFIG_HVC_DRIVER.
    • It's not possible to capture early boot messages with it. It starts working around the time /dev is populated. (by using mdev, sdev, etc.)
    • This is for vz.LinuxBootLoader.
  • Must be enabled CONFIG_VIRTIO_BALLOON to use the memory balloon device.
  • Must be enabled CONFIG_VIRTIO_BLK to use the block device.
    • Only RAW disk images on APFS are supported. Other formats are not supported.
  • Must be enabled CONFIG_VIRTIO_NET to use the network device.
  • Shared Directories

Refs

Clone this wiki locally