macOS and Linux VMs on Apple Silicon to use in CI and other automations
Go to file
fedor abb1d7192a Documentation code block tweaks 2023-01-17 15:14:03 -05:00
.ci Fixed packaging 2022-09-14 10:06:22 -04:00
.github Added Code Owners (#328) 2022-11-17 22:57:12 -05:00
.run Embed AppIcon.png within binary (#30) 2022-04-22 10:29:52 +03:00
Resources Removed Git LFS (#382) 2023-01-17 23:47:35 +04:00
Sources/tart Fix ArgumentParser's exception printing (#367) 2022-12-21 18:06:01 +04:00
Tests/TartTests Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
docs Documentation code block tweaks 2023-01-17 15:14:03 -05:00
integration-tests Integration tests (#313) 2022-11-14 13:24:51 -05:00
.cirrus.yml Documentation Website (#380) 2023-01-17 19:08:30 +00:00
.editorconfig Update dependencies and styles (#12) 2022-03-24 18:54:49 +03:00
.gitignore Use GoReleaser for releases (#27) 2022-04-18 16:33:10 +03:00
.goreleaser.yml Include version in installer (#218) 2022-09-01 19:42:50 +04:00
.swiftformat Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
LICENSE Create LICENSE (#10) 2022-03-07 11:46:29 -05:00
Package.resolved Sentry integration (#352) 2022-12-15 13:50:21 +00:00
Package.swift Sentry integration (#352) 2022-12-15 13:50:21 +00:00
README.md Documentation code block tweaks 2023-01-17 15:14:03 -05:00
gon.hcl Update Developer Certificates (#242) 2022-09-13 09:36:35 -04:00
mkdocs.yml Documentation code block tweaks 2023-01-17 15:14:03 -05:00

README.md

Tart is a virtualization toolset to build, run and manage macOS and Linux virtual machines (VMs) on Apple Silicon. Built by CI engineers for your automation needs. Here are some highlights of Tart:

  • Tart uses Apple's own Virtualization.Framework for near-native performance.
  • Push/Pull virtual machines from any OCI-compatible container registry.
  • Use Tart Packer Plugin to automate VM creation.
  • Built-in CI integration.

Tart is already adopted by several automation services:

Many more companies are using Tart in their internal setups. Here are a few of them:

Note: If your company or project is using Tart please consider adding yourself to the list above.

Usage

Try running a Tart VM on your Apple Silicon device running macOS 12.0 (Monterey) or later (will download a 25 GB image):

brew install cirruslabs/cli/tart
tart clone ghcr.io/cirruslabs/macos-ventura-base:latest ventura-base
tart run ventura-base

Please check the official documentation for more information and/or feel free to use discussions for remaining questions.

FAQ

How Tart is different from Anka

Under the hood Tart is using the same technology as Anka 3.0 so there should be no real difference in performance or features supported. If there is some feature missing please don't hesitate to create a feature request.

Instead of Anka Registry, Tart can work with any OCI-compatible container registry.

Tart doesn't yet have an analogue of Anka Controller for managing long living VMs. Please take a look at CI integration section for an option to run ephemeral VMs for your needs.

Why Tart is free and open sourced?

Apple did all the heavy lifting with their Virtualization.Framework and it just felt right to develop Tart in the open. Please consider becoming a sponsor if you find Tart saving a substantial amount of money on licensing and engineering hours for your company.

How to change VM's disk size?

You can choose disk size upon creation of a virtual machine:

tart create --from-ipsw=latest --disk-size=25 monterey-vanilla

For an existing VM please use Packer Plugin which can increase disk size for new virtual machines. Here is an example of how to change disk size in a Packer template.

VM location on disk

Tart stores all it's files in ~/.tart/ directory. Local images that you can run are stored in ~/.tart/vms/. Remote images are pulled into ~/.tart/cache/OCIs/.

Nested virtualization support?

Tart is limited by functionality of Apple's Virtualization.Framework. At the moment Virtualization.Framework doesn't support nested virtualization.

Changing the default NAT subnet

To change the default network to 192.168.77.1:

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Address -string 192.168.77.1

Note that even through a network would normally be specified as 192.168.77.0, the vmnet framework seems to treat this as a starting address too and refuses to pick up such network-like values.

The default subnet mask 255.255.255.0 should suffice for most use-cases, however, you can also change it to 255.255.0.0, for example:

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist Shared_Net_Mask -string 255.255.0.0