# foxlet/macos-simple-kvm architecture

> Architecture diagram of the GitHub repository foxlet/macos-simple-kvm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/foxlet/macos-simple-kvm
- Repository: https://github.com/foxlet/macos-simple-kvm

## Overview

macOS-Simple-KVM is a shell-script toolkit for downloading macOS installation media and running a macOS virtual machine in QEMU with KVM acceleration. The principal workflow is to obtain installation media, create a virtual disk, launch the installer, and then tune or access the VM. It also offers a Virt-Manager setup path and a headless VNC launch option. The README documents these user-facing paths; source excerpts show the media fetcher’s internal stages, but not how the shell scripts invoke one another or QEMU.

Main entry points: [`tools/FetchMacOS/fetch-macos.py`](https://github.com/foxlet/macos-simple-kvm/blob/master/tools/FetchMacOS/fetch-macos.py) (macOS fetcher), [`jumpstart.sh`](https://github.com/foxlet/macos-simple-kvm/blob/master/jumpstart.sh) (Media setup), [`basic.sh`](https://github.com/foxlet/macos-simple-kvm/blob/master/basic.sh) (QEMU launcher), [`headless.sh`](https://github.com/foxlet/macos-simple-kvm/blob/master/headless.sh) (Headless launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_media["Installation media"]
  node_jumpstart["Media setup<br/>[jumpstart.sh]"]
  node_fetcher["macOS fetcher<br/>[fetch-macos.py]"]
  node_software["Apple Software Update"]
  node_media_files["Installer packages"]
  node_dmg2img["DMG conversion"]
end

subgraph group_launch["VM launch"]
  node_basic["QEMU launcher<br/>[basic.sh]"]
  node_qemu["QEMU and KVM"]
  node_system_disk[("VM disk image<br/>[ESP.qcow2]")]
  node_headless["Headless launcher<br/>[headless.sh]"]
  node_virtmanager["Virt-Manager setup<br/>[make.sh]"]
end

subgraph group_configuration["VM configuration"]
  node_networking["Network configuration"]
  node_passthrough["Hardware passthrough"]
  node_performance["Performance tuning"]
  node_resolution["Screen resolution"]
  node_virtio["VirtIO setup<br/>[virtio.sh]"]
end

subgraph group_guides["Setup guidance"]
  node_faqs["FAQs<br/>[FAQs.md]"]
  node_apple_id["Apple ID guide<br/>[guide-Apple-ID.md]"]
end

node_user(("VM operator"))

node_user -->|"runs"| node_jumpstart
node_jumpstart -->|"downloads media"| node_media_files
node_user -.->|"runs"| node_fetcher
node_fetcher -->|"requests catalogs"| node_software
node_fetcher -->|"downloads packages"| node_media_files
node_user -->|"converts DMG"| node_dmg2img
node_user -->|"runs"| node_basic
node_user -->|"creates disk"| node_system_disk
node_basic -->|"starts VM"| node_qemu
node_user -->|"runs"| node_headless
node_headless -->|"starts VM"| node_qemu
node_user -->|"imports setup"| node_virtmanager
node_user -->|"consults"| node_networking
node_user -->|"consults"| node_passthrough
node_user -->|"consults"| node_performance
node_user -->|"consults"| node_resolution
node_user -->|"consults"| node_faqs

click node_jumpstart "https://github.com/foxlet/macos-simple-kvm/blob/master/jumpstart.sh"
click node_fetcher "https://github.com/foxlet/macos-simple-kvm/blob/master/tools/FetchMacOS/fetch-macos.py"
click node_dmg2img "https://github.com/foxlet/macos-simple-kvm/blob/master/tools/dmg2img"
click node_basic "https://github.com/foxlet/macos-simple-kvm/blob/master/basic.sh"
click node_system_disk "https://github.com/foxlet/macos-simple-kvm/blob/master/ESP.qcow2"
click node_headless "https://github.com/foxlet/macos-simple-kvm/blob/master/headless.sh"
click node_virtmanager "https://github.com/foxlet/macos-simple-kvm/blob/master/make.sh"
click node_networking "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-networking.md"
click node_passthrough "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-passthrough.md"
click node_performance "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-performance.md"
click node_resolution "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-screen-resolution.md"
click node_virtio "https://github.com/foxlet/macos-simple-kvm/blob/master/virtio.sh"
click node_faqs "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/FAQs.md"
click node_apple_id "https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-Apple-ID.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_jumpstart,node_fetcher,node_software,node_media_files,node_dmg2img toneBlue
class node_basic,node_qemu,node_system_disk,node_headless,node_virtmanager toneAmber
class node_networking,node_passthrough,node_performance,node_resolution,node_virtio toneMint
class node_faqs,node_apple_id toneRose
class node_user toneIndigo
```

## Components

### Installation media

- [Media setup](https://github.com/foxlet/macos-simple-kvm/blob/master/jumpstart.sh): `jumpstart.sh`
- [macOS fetcher](https://github.com/foxlet/macos-simple-kvm/blob/master/tools/FetchMacOS/fetch-macos.py): `tools/FetchMacOS/fetch-macos.py`
- **Apple Software Update**
- **Installer packages**
- [DMG conversion](https://github.com/foxlet/macos-simple-kvm/blob/master/tools/dmg2img): `tools/dmg2img`

### VM launch

- [QEMU launcher](https://github.com/foxlet/macos-simple-kvm/blob/master/basic.sh): `basic.sh`
- **QEMU and KVM**
- [VM disk image](https://github.com/foxlet/macos-simple-kvm/blob/master/ESP.qcow2): `ESP.qcow2`
- [Headless launcher](https://github.com/foxlet/macos-simple-kvm/blob/master/headless.sh): `headless.sh`
- [Virt-Manager setup](https://github.com/foxlet/macos-simple-kvm/blob/master/make.sh): `make.sh`

### VM configuration

- [Network configuration](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-networking.md): `docs/guide-networking.md`
- [Hardware passthrough](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-passthrough.md): `docs/guide-passthrough.md`
- [Performance tuning](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-performance.md): `docs/guide-performance.md`
- [Screen resolution](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-screen-resolution.md): `docs/guide-screen-resolution.md`
- [VirtIO setup](https://github.com/foxlet/macos-simple-kvm/blob/master/virtio.sh): `virtio.sh`

### Setup guidance

- [FAQs](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/FAQs.md): `docs/FAQs.md`
- [Apple ID guide](https://github.com/foxlet/macos-simple-kvm/blob/master/docs/guide-Apple-ID.md): `docs/guide-Apple-ID.md`

### Other components

- **VM operator**

## Connections

- VM operator → Media setup: runs (evidence: `README.md`)
- Media setup → Installer packages: downloads media (evidence: `README.md`)
- VM operator → macOS fetcher: runs
- macOS fetcher → Apple Software Update: requests catalogs (evidence: `tools/FetchMacOS/fetch-macos.py`)
- macOS fetcher → Installer packages: downloads packages (evidence: `tools/FetchMacOS/fetch-macos.py`)
- VM operator → DMG conversion: converts DMG (evidence: `README.md`)
- VM operator → QEMU launcher: runs (evidence: `README.md`)
- VM operator → VM disk image: creates disk (evidence: `README.md`)
- QEMU launcher → QEMU and KVM: starts VM (evidence: `README.md`)
- VM operator → Headless launcher: runs (evidence: `README.md`)
- Headless launcher → QEMU and KVM: starts VM (evidence: `README.md`)
- VM operator → Virt-Manager setup: imports setup (evidence: `README.md`)
- VM operator → Network configuration: consults (evidence: `README.md`)
- VM operator → Hardware passthrough: consults (evidence: `README.md`)
- VM operator → Performance tuning: consults (evidence: `README.md`)
- VM operator → Screen resolution: consults (evidence: `README.md`)
- VM operator → FAQs: consults (evidence: `README.md`)
