---
title: Run and manage macOS and Linux virtual machines on Apple silicon with Tart
description: Tart is a virtualization toolset to run and manage macOS and Linux virtual machines on Apple silicon.
tags: mac m1 m2 linux
products:
  - instances
dates:
  validation: 2025-02-11
  posted: 2024-01-30
  validation_frequency: 12
difficulty: beginner
usecase:
  - resource-management
ecosystem:
  - third-party
---
import image from './assets/tart-run-sonoma.webp'
import image2 from './assets/tart-run-ubuntu.webp'

import Requirements from '@macros/iam/requirements.mdx'


Tart is a virtualization toolset developed for building, running, and managing macOS and Linux virtual machines (VMs) on Apple silicon. Engineered by CI experts to meet automation needs, Tart provides several noteworthy features.

Utilizing Apple's Virtualization framework, Tart ensures near-native performance, providing a smooth virtualization experience.
Virtual machines can be effortlessly pushed and pulled from any OCI-compatible container registry, enhancing flexibility and compatibility.

The inclusion of the Tart Packer Plugin streamlines the process of VM creation, allowing for automated and efficient virtual machine setup.
Furthermore, Tart seamlessly integrates with any Continuous Integration (CI) systems, allowing you to configure workflows for automated tasks and processes.

One notable application of Tart is its role as the driving force behind the Cirrus Runners service, positioned as a superior alternative to standard GitHub-hosted runners.

This service not only offers 2-3 times better performance but also does so at a fraction of the cost, highlighting Tart's ability to optimize virtualization for enhanced efficiency.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- [Created a Mac mini](/apple-silicon/how-to/create-mac-mini/) running macOS 13.0 (Ventura) or later
- Installed a package manager

In this tutorial, we will use [Homebrew](https://brew.sh/index), which is a popular package manager for macOS.

## Installing Tart and a first VM on macOS

1. Install Tart using Homebrew. Open your terminal and run the following command to install Tart on your Mac mini using Homebrew.
    ```bash
    brew install cirruslabs/cli/tart
    ```

2. Clone the desired VM image from the available macOS images on Tart's GitHub repository. For example, to run the macOS Sonoma image, use the following commands:
    ```bash
    tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest sonoma-base
    tart run sonoma-base
    ```
    <Message type="tip">
        Explore the full list of [available macOS images](https://github.com/orgs/cirruslabs/packages?tab=packages&q=macos-) on Tart's official GitHub repository.
    </Message>

3. The virtual machine displays. Log into the virtual machine with the provided credentials.
   - Username: `admin`
   - Password: `admin`

   The macOS desktop displays:
   <Lightbox image={image} alt="macOS Sonoma in a virtual machine, displayed on the main desktop of a Mac mini" size="large" />

## Running Linux images with Tart

Currently, Tart supports the following Linux images:

* Ubuntu: `ghcr.io/cirruslabs/ubuntu:latest`
* Debian: `ghcr.io/cirruslabs/debian:latest`
* Fedora: `ghcr.io/cirruslabs/fedora:latest`

1. Clone the Ubuntu image and resize its disk size to 50 GB using the following commands:
    ```bash
    tart clone ghcr.io/cirruslabs/ubuntu:latest ubuntu
    tart set ubuntu --disk-size 50
    ```
    <Message type="tip">
        Resizing is optional, but useful to adapt the disk size according to your requirements. The default disk size for Linux images is 20 GB.
    </Message>

2. Run the resized Ubuntu image and log in with the provided credentials.
    ```bash
    tart run ubuntu
    ```
    <Message type="tip">
        Explore the full list of [available Linux images](https://github.com/orgs/cirruslabs/packages?repo_name=linux-image-templates) on Tart's official GitHub repository.
    </Message>

3. After running the Ubuntu image, log into the virtual machine with the provided credentials.
   - Username: `admin`
   - Password: `admin`

  <Lightbox image={image2} alt="Ubuntu Linux in a virtual machine, displayed on the main desktop of a Mac mini" size="large" />
  <Message type="tip">
    On images with SSH enabled, you can log in either from the terminal or by using the SSH server, listening on the private IP address of the VM.
  </Message>


## Mounting directories

### Mounting a directory

  To mount a directory, initiate the VM with the `--dir` argument.
    ```bash
    tart run --dir=my-project:~/src/my-project vm
    ```
    <Message type="tip">
        For read-only mode, include a third parameter, `:ro`.
        ```bash
        tart run --dir=my-project:~/src/my-project:ro vm
        ```
    </Message>

### Mounting multiple directories

  Repeat the `--dir` argument for each directory if you want to mount several.
    ```bash
    tart run --dir=www1:~/my-project1/www --dir=www2:~/my-project2/www
    ```
    <Message type="tip">
        Ensure that the first parameter in each `--dir` argument is unique. Otherwise, only the last `--dir` argument using that name will be applied.
    </Message>

## Accessing mounted directories

### macOS guests

All shared directories automatically mount to the `/Volumes/My Shared Files` directory within the guest VM.

### Linux guests

To access shared directories from the Linux guest, manually mount the virtual file system:
```bash
mount -t virtiofs com.apple.virtio-fs.automount /mnt/shared
```
The directory mounted using this command will be accessible from `/mnt/shared/my-project` within the guest VM.

## Going further

For further information on how to virtualize macOS and Linux guests on Apple silicon using Tart, refer to the [official Tart documentation](https://tart.run/).

### Licensing information

Both [Tart Virtualization](https://github.com/cirruslabs/tart) and [Orchard Orchestration](https://github.com/cirruslabs/orchard) are licensed under the [Fair Source License](https://fair.io/). Usage on personal computers, including personal workstations, is royalty-free. Organizations exceeding specific installations will need to obtain a paid license.