cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.65k stars 102 forks source link

Suspend functionality doesn't work when using Debian #796

Closed eccoisle closed 2 months ago

eccoisle commented 2 months ago

machine

M1 MacBook Air macOS Sonoma 14.4.1

steps to reproduce

  1. Create a new Debian VM tart clone ghcr.io/cirruslabs/debian:latest debian
  2. Run the VM tart run debian
  3. Suspend the VM using the Menu Bar:

Control

Start Stop Request Stop Suspend

Terminal Output: pausing VM to take a snapshot... creating a snapshot... snapshot created successfully! shutting down the VM... CancellationError()

  1. Attempt to start the VM tart run debian

Terminal Output: restoring VM state from a snapshot... Error Domain=VZErrorDomain Code=12 "The virtual machine failed to restore with error “invalid argument”." UserInfo={NSLocalizedFailure=An error occurred while restoring the virtual machine., NSLocalizedFailureReason=The virtual machine failed to restore with error “invalid argument”.}

Note: I've also tried prepending the --suspendable option to the 'tart run' command tart run --suspendable debian, and then closing the window using the window controls, but this results in the same error output.

Would really appreciate any insight!

fkorotkov commented 2 months ago

@eccoisle unfortunately only macOS VMs can be suspendable at the moment. Fixing the UX in #797

eccoisle commented 2 months ago

Thanks for the quick response, and this excellent piece of software! Any possibility of this functionality being added to Linux VMs down the line?

fkorotkov commented 2 months ago

Thank you for you kind words! We are limited by possibilities of Virtualization.Framework and the moment it will have suspension for Linux VMs we'll support it.