Skip to content

Quickstart: create your first VM

In this quickstart, you create a macOS template, clone a VM from it, run commands inside the guest, copy a file into it, and then remove everything you created.

  • Install Pomme, and confirm that pomme --version works.
  • Make sure that your login Keychain is unlocked.
  • Make sure that the host has internet access and enough free disk space for a restore image of about 20 GB plus the VM disks that you create.

Restoring a macOS image is the slowest part of creating a VM. A template does that work once so that later VMs can clone it instead of restoring again.

To create a template from the latest signed macOS version, run the following command:

Terminal window
pomme template create base --latest --disk-size 40GB

Pomme downloads the restore image, if it isn’t already cached, and restores it into the template. The restore itself takes about four minutes for a 20 GB image, plus the time to download the image.

Every VM that you clone from this template gets a 40 GB disk.

To clone a VM named dev from the template, run the following command:

Terminal window
pomme create dev --from-template base --memory 4GB

Pomme clones the template’s disk, installs and verifies the Pomme guest agent, and leaves the VM running in normal macOS. Pomme records each creation step in a journal. If creation is interrupted, you can continue it with pomme create dev --resume.

To check the VM’s state, run the following command:

Terminal window
pomme status dev

To run a program in the guest and print its output, use pomme exec. Put the program and its arguments after --:

Terminal window
pomme exec dev -- /usr/bin/sw_vers

The output is the guest’s macOS version:

ProductName: macOS
ProductVersion: 26.6.2
BuildVersion: 25G83

Your version and build depend on the restore image that you installed.

To open an interactive shell in the guest, run the following command:

Terminal window
pomme shell dev

The shell runs as root by default. To leave the shell, type exit. To detach and leave the shell running, type ~. at the start of a line. For more about detached shells, see Use durable terminal sessions.

To copy a file from the host into the guest and read it back, follow these steps:

  1. Create a file on the host:

    Terminal window
    echo "Hello from the host" > hello.txt
  2. Copy the file into the guest’s /tmp directory:

    Terminal window
    pomme cp hello.txt dev:/tmp/hello.txt
  3. Read the file from the guest:

    Terminal window
    pomme cat dev:/tmp/hello.txt

    The output is the file’s contents:

    Hello from the host

To avoid using host disk space and memory, remove the resources that you created in this quickstart.

  1. Stop the VM:

    Terminal window
    pomme stop dev

    Pomme asks the guest to shut down and waits for it. If the guest doesn’t shut down in time, Pomme powers it off and says so.

  2. Delete the VM:

    Terminal window
    pomme delete dev

    Pomme asks you to confirm the deletion.

  3. Optional: if you don’t plan to create more VMs from the template, delete it:

    Terminal window
    pomme template delete base
  4. Delete the local test file:

    Terminal window
    rm hello.txt