Contents

pause(completionHandler:)

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

Declaration

func pause(completionHandler: @escaping (Result<Void, any Error>) -> Void)

Parameters

  • completionHandler:

    The block to call with the results of the pause attempt. This block has no return value and has one Nserror object as its parameter:

    result

    A result type that contains an error object when the VM fails to pause.

Discussion

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

See Also

Starting and stopping the VM