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.
Before you begin
Section titled “Before you begin”- Install Pomme, and confirm that
pomme --versionworks. - 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.
Create a template
Section titled “Create a template”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:
pomme template create base --latest --disk-size 40GBPomme 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.
Create a VM from the template
Section titled “Create a VM from the template”To clone a VM named dev from the template, run the following command:
pomme create dev --from-template base --memory 4GBPomme 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:
pomme status devRun a command in the guest
Section titled “Run a command in the guest”To run a program in the guest and print its output, use pomme exec. Put the
program and its arguments after --:
pomme exec dev -- /usr/bin/sw_versThe output is the guest’s macOS version:
ProductName: macOSProductVersion: 26.6.2BuildVersion: 25G83Your version and build depend on the restore image that you installed.
Open a shell in the guest
Section titled “Open a shell in the guest”To open an interactive shell in the guest, run the following command:
pomme shell devThe 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.
Copy a file into the guest
Section titled “Copy a file into the guest”To copy a file from the host into the guest and read it back, follow these steps:
-
Create a file on the host:
Terminal window echo "Hello from the host" > hello.txt -
Copy the file into the guest’s
/tmpdirectory:Terminal window pomme cp hello.txt dev:/tmp/hello.txt -
Read the file from the guest:
Terminal window pomme cat dev:/tmp/hello.txtThe output is the file’s contents:
Hello from the host
Clean up
Section titled “Clean up”To avoid using host disk space and memory, remove the resources that you created in this quickstart.
-
Stop the VM:
Terminal window pomme stop devPomme 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.
-
Delete the VM:
Terminal window pomme delete devPomme asks you to confirm the deletion.
-
Optional: if you don’t plan to create more VMs from the template, delete it:
Terminal window pomme template delete base -
Delete the local test file:
Terminal window rm hello.txt