---
title: VZVirtualMachineDelegate
framework: virtualization
role: symbol
role_heading: Protocol
path: virtualization/vzvirtualmachinedelegate
---

# VZVirtualMachineDelegate

The methods you use to respond to changes in the state of the VM.

## Declaration

```swift
protocol VZVirtualMachineDelegate : NSObjectProtocol
```

## Topics

### Stopping the VM

- [guestDidStop(_:)](virtualization/vzvirtualmachinedelegate/guestdidstop(_:).md)
- [virtualMachine(_:didStopWithError:)](virtualization/vzvirtualmachinedelegate/virtualmachine(_:didstopwitherror:).md)

### Responding to network device errors

- [virtualMachine(_:networkDevice:attachmentWasDisconnectedWithError:)](virtualization/vzvirtualmachinedelegate/virtualmachine(_:networkdevice:attachmentwasdisconnectedwitherror:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Responding to a stopped VM

- [delegate](virtualization/vzvirtualmachine/delegate.md)
