You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently lume does not support creating, managing, or restoring VM snapshots.
Desired Behavior
Ability to:
Create named snapshots of running or stopped VMs
List available snapshots for a VM
Restore VMs to previous snapshots
Delete snapshots
Export/Import snapshots
Technical Implementation
macOS Virtualization.Framework already provides snapshot support through VZMacOSVirtualMachineSnapshot class, which offers:
VZMacOSVirtualMachine.takeSnapshot() - Creates a snapshot of the current VM state
VZMacOSVirtualMachine.restoreSnapshot(_:) - Restores VM to a previous snapshot
Snapshot data can be written to disk using write(toFile:) and loaded using init(contentsOf:)
This native support makes implementation straightforward, mainly requiring:
CLI interface to expose snapshot functions
Snapshot management system
Storage handling for snapshot files
Proposed CLI Commands
# Create snapshot
lume snapshot create <vm-name> [--name <snapshot-name>]
# List snapshots
lume snapshot list <vm-name># Restore snapshot
lume snapshot restore <vm-name><snapshot-name># Delete snapshot
lume snapshot delete <vm-name><snapshot-name># Export snapshot
lume snapshot export<vm-name><snapshot-name><output-path># Import snapshot
lume snapshot import <vm-name><snapshot-path>
The text was updated successfully, but these errors were encountered:
Thanks for these details, @Else00, and for already digging into the Apple Virtualization docs.
I haven’t had the chance to experiment with VZMacOSVirtualMachine.takeSnapshot() yet, but do you think it could be used to implement a lume suspend command? VZVirtualMachine can be paused, but I’m not sure if that state can persist across different runs.
Current Behavior
Currently lume does not support creating, managing, or restoring VM snapshots.
Desired Behavior
Ability to:
Technical Implementation
macOS Virtualization.Framework already provides snapshot support through
VZMacOSVirtualMachineSnapshot
class, which offers:VZMacOSVirtualMachine.takeSnapshot()
- Creates a snapshot of the current VM stateVZMacOSVirtualMachine.restoreSnapshot(_:)
- Restores VM to a previous snapshotwrite(toFile:)
and loaded usinginit(contentsOf:)
This native support makes implementation straightforward, mainly requiring:
Proposed CLI Commands
The text was updated successfully, but these errors were encountered: