---
title: "update(_:completionHandler:)"
framework: virtualization
role: symbol
role_heading: Instance Method
path: "virtualization/vzcustomvirtiodevice/update(_:completionhandler:)"
---

# update(_:completionHandler:)

Updates the device’s device-specific configuration.

## Declaration

```swift
func update(_ newConfiguration: VZVirtioDeviceSpecificConfiguration, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func update(_ newConfiguration: VZVirtioDeviceSpecificConfiguration) async throws
```

## Parameters

- `newConfiguration`: The doc://com.apple.virtualization/documentation/Virtualization/VZVirtioDeviceSpecificConfiguration object that contains the new configuration data.
- `completionHandler`: A block the framework calls after the device’s configuration updates successfully, or on error. The error parameter the framework passes to the block is nil if the configuration update was successful.

## Discussion

Discussion The size of the underlying data for the new configuration must be the same as the previous configuration. The framework raises an exception if this condition isn’t met.
