Move, back up, and export machines
Put machines on another drive, back them up with Time Machine, or export a disk for another app.
Put a machine on another drive
The drive must be APFS and attached to your Mac. Reformatting a drive as APFS in Disk Utility erases it.
- Choose File > New Machine and select a system.
- Under Volume, choose the drive.
- Compare Needed and Available, then click Create.
osmates vm volumes lists the volumes and why OSMates can't use one. In Terminal, name the drive, or give its UUID when two drives share a name:
osmates vm create dev --volume "Samsung T7"
Machines on your startup disk live in ~/Library/Application Support/OSMates/Machines. Another drive gets an OSMates Machines folder. Downloads still go to the image cache, so its drive needs room too.
Move a machine
- Shut down the machine.
- Select it, choose Machine > Move to, then choose a drive and click Move.
- Follow the progress in the Overview. Click Cancel to stop.
osmates vm move-to dev "Samsung T7"
OSMates checks the copy before it removes the original, and a failed move leaves the machine where it was. Running, suspended, and temporary machines can't move.
Snapshots share space with the disk only on one drive. Check that the new drive has more room than the machine used.
A macOS machine on a drive you unplug can start on another Mac, with a new identity.
To see a machine's file, choose Machine > Show in Finder. OSMates ignores a copy made in Finder, so clone the machine instead.
Unplug a drive
Shut down the drive's machines before you eject it. Until it's back, they show as Offline, and you can't start, change, or delete them.
A running machine whose drive you unplug can't read or write its disk. Shut it down, then attach the drive again.
The first time you use a removable drive, you see requests for OSMates and OSMates Worker to access it. Click Allow for both.
Keep downloaded images on another drive
Restore images, disk images, and installers download once into ~/Library/Caches/OSMates/Images.
- Choose OSMates > Settings, then click General.
- Under Downloaded Images, click Change.
- Choose an empty folder on an APFS drive, not in iCloud Drive or a shared folder, then click Move Here.
osmates settings image-cache move "/Volumes/Samsung T7/OSMates Images"
To bring the images back, click Use Default Folder. While the drive is away, downloads go to your startup disk. General settings offer to move them once it's back. No machine can be created while images move.
Back up machines with Time Machine
Time Machine skips machines unless you turn this on, because their disks are large and change while they run.
- Choose OSMates > Settings, then click General.
- Under Backups, turn on Back up machines with Time Machine.
osmates backups include
The setting covers every machine, also one excluded with tmutil addexclusion or on another drive. Time Machine still backs up an external drive only if its own settings include it. Snapshots stay on this Mac and don't replace a backup.
Export a disk
- Shut down the machine.
- Choose Machine > Export Disk.
- Choose RAW or qcow2, and a disk if the machine has several, then click Export.
osmates vm export dev ~/Desktop/dev.qcow2 --format qcow2
The export reads a clone of the disk, so the machine can start meanwhile. --replace writes over an existing file. RAW on exFAT takes the full disk size, and FAT32 can't hold files over 4 GB.
To bring the file back, run osmates vm import <file>.