Request an invite
Docs menu
View as Markdown

Clone a machine

Copy a machine to try something risky, or run one command in a copy that deletes itself.

Clone a machine

Cloning is in Terminal. In the app, make a template and create machines from it instead.

To clone dev now, from its snapshot clean, or as a clone that deletes itself when it stops:

sh
osmates vm clone dev scratch
osmates vm clone dev scratch --snapshot clean
osmates vm clone dev scratch --ephemeral

A running machine keeps running while it's cloned. A clone takes almost no space until it writes.

A clone has its own name, MAC address, and identity. It keeps its source's shared folders and clipboard setting, but no forwarded ports. A Linux clone doesn't run its source's user-data again.

A Windows clone needs its own license. A macOS clone may need you to sign in to iCloud again. For Xcode work, see Run Xcode tests in a macOS machine.

Run one command in a temporary clone

To run the tests of src in a clone of dev:

sh
osmates run dev --copy-in src:/srv/src -- make -C /srv/src test

This clones dev, copies in src, and runs the command. Then it deletes the clone and exits with the command's status. --copy-out brings files back, with quarantine information.

Without a machine name, osmates run uses the template for agents. These clones have no shared folders or forwarded ports.

Report a problem with this page