# 0. install, start, kernel container system start container system kernel set --recommended # 1. the official image cannot boot as a machine container run --rm debian:13 sh -c 'ls -l /sbin/init' # 2. build a Debian image with an init (Dockerfile above) container builder start container build -t debian13-machine . container builder stop # 3. check it container run --rm debian13-machine sh -c 'ls -l /sbin/init; wc -c < /etc/machine-id' # 4. create, then wait for it container machine create debian13-machine --name dev-vm --cpus 2 --memory 2G until container machine run -n dev-vm --root -- true 2>/dev/null; do sleep 2; done # 5. check it container machine run -n dev-vm -- 'systemctl is-system-running; id; sudo -n id -u' # 6. customize it container machine run -n dev-vm --root -- 'apt-get update && apt-get install -y git' # 2-5, the short way bin/mkdebian-machine new -t debian13-machine -m dev-vm -p sudo # 7. Ollama on all interfaces, restarted with launchctl /usr/libexec/PlistBuddy -c 'Set :EnvironmentVariables:OLLAMA_HOST 0.0.0.0:8000' ~/Library/LaunchAgents/homebrew.mxcl.ollama.plist launchctl bootout gui/$(id -u)/homebrew.mxcl.ollama launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/homebrew.mxcl.ollama.plist # 8. the Mac on its own bin/test-mac-ollama # 9. the model from the VM container machine run -n dev-vm -- 'curl -s http://192.168.64.1:8000/v1/models' # 10. the whole round trip bin/test-vm-ollama -n dev-vm # clean up container machine stop dev-vm container machine delete dev-vm container image rm debian13-machine