Configuring virtual linux devices for save/restore

When I call either of

  • VZVirtualMachineConfiguration.validateSaveRestoreSupport(..)
  • VZVirtualMachine.saveMachineStateTo(URL)

I get the error:

NSLocalizedFailure=Invalid virtual machine configuration. 
NSLocalizedFailureReason=Unsupported graphics device in configuration

For Linux there seems to be only vanilla size configuration (at least 1 scanout is required):

let graphicsDevice = VZVirtioGraphicsDeviceConfiguration()
graphicsDevice.scanouts = [
  VZVirtioGraphicsScanoutConfiguration(widthInPixels: 1920, heightInPixels: 1080)
]

I've tried valid sizes and aspect ratios.

I've otherwise removed console and audio devices provoking similar errors, but I can't find an acceptable graphics configuration.

I believe it should work because my code is substantially similar to the open-source tart application that supports suspend.

I'm running Sonoma 14.2.1 on an M1 Studio with an HP24mh external monitor via a third-party HDMI/USB-C adapter.

I see nothing in the Console (except some ...wakeups_resource.diag common to other applications).

So I'm looking for help with

  • How to get more information for this failure
  • How to configure suspendable/resumable devices: graphics for sure, but also console, audio, keyboard, etc.

Thanks!

  • Update: tart does not support suspending Linux VM's, so I have no evidence this is possible. Also, my VM crashes when using the "Suspend" command from inside ubuntu Linux guest.

Add a Comment