---
title: "init(attachment:)"
framework: virtualization
role: symbol
role_heading: Initializer
path: "virtualization/vzvirtioblockdeviceconfiguration/init(attachment:)"
---

# init(attachment:)

Creates a block device configuration object that uses the specified storage medium.

## Declaration

```swift
init(attachment: VZStorageDeviceAttachment)
```

## Parameters

- `attachment`: The attachment object that provides the storage for the device. For example, specify a doc://com.apple.virtualization/documentation/Virtualization/VZDiskImageStorageDeviceAttachment object to implement the storage using a local disk image on the host computer.

## Return Value

Return Value A block storage device configuration object to include in your virtual machine’s configuration.
