macOS VM
This directory contains the docker-compose.yaml for running a macOS virtual machine within Podman (or Docker). This setup is highly hardware-specific due to the use of /dev/kvm and direct device access, making it unsuitable for a Swarm environment.
Running with Podman Compose
To run this service using podman-compose:
- Important: Ensure your host system meets the requirements for running KVM-accelerated VMs (e.g.,
/dev/kvmis available and configured). - Navigate to this directory:
cd optimized/standalone/MacOS - Start the service:
podman-compose up -d
Running with Podman
You can run the macOS VM directly with Podman. Pay close attention to the device mappings and network configuration.
podman run -d \
--name macos \
--restart always \
-e VERSION="15" \
-e DISK_SIZE="50G" \
-e RAM_SIZE="6G" \
-e CPU_CORES="4" \
--device /dev/kvm \
--device /dev/net/tun \
--cap-add NET_ADMIN \
-p 8006:8006 \
-p 5900:5900/tcp \
-p 5900:5900/udp \
-v ./macos:/storage \
dockurr/macos
Note: The original docker-compose.yaml defines a custom network with a specific ipv4_address. To replicate this with podman run, you would first need to create the network:
podman network create --subnet 172.70.20.0/29 macos
Then, you would need to attach the container to this network and specify the IP:
# ... (previous podman run command parts)
--network macos --ip 172.70.20.3 \
dockurr/macos
Notes
- This service requires significant host resources and direct hardware access.
- The
stop_grace_periodis important for proper VM shutdown. - Ensure the
./macosdirectory exists and has appropriate permissions for the VM storage.