Contents

pause()

Pauses a running VM and notifies the specified completion handler of the results.

Declaration

func pause() async throws

Discussion

Call this method to pause a VM that’s in the VZVirtualMachine.State.running state. To determine if a VM is in a state that allows you to pause it, check the VM’s canPause property.

If the VM stops before the attempt to pause it finishes, this method calls the completion handler with an error.

See Also

Starting and stopping the VM