---
name: "vnd"
section: "4"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/vnd"
---

# vnd(4)

vnode disk driver

## NAME

**vnd** – vnode disk driver

## SYNOPSIS

**pseudo-device vnd** \[*count*\]

## DESCRIPTION

The **vnd** driver provides a disk-like interface to a file. This is useful for a variety of applications, such as building miniroot or floppy disk images.

This document assumes familiarity with how to generate kernels and how to properly configure disks and pseudo-devices in a kernel configuration file.

In order to compile in support for **vnd** devices, a line similar to the following must be present in the kernel configuration file:

```
pseudo-device	vnd	4	# vnode disk driver
```

The *count* argument is how many **vnds** memory is allocated for at boot time. In this example, no more than 4 **vnds** may be configured.

There is a run-time utility that is used for configuring **vnds**. See [vnconfig(8)](/vnconfig/8.md) for more information.

## IOCTL INTERFACE

The following [ioctl(2)](/ioctl/2.md) calls are defined in ⟨dev/vndioctl.h⟩:

- VNDIOCSET *struct vnd\_ioctl \**

  Associate the file *vnd\_file* with a **vnd** pseudo device, optionally encrypted using the Blowfish cipher and the key specified in *vnd\_key* of length *vnd\_keylen*. The size of the configured device is returned in *vnd\_size*.

  ```
  struct vnd_ioctl {
  	char	*vnd_file;
  	off_t	vnd_size;
  	u_char	*vnd_key;
  	int	vnd_keylen;
  };
  ```

- VNDIOCCLR *struct vnd\_ioctl \**

  Disassociate a **vnd** device.

- VNDIOCGET *struct vnd\_user \**

  Get the associated file name, device, inode number, and unit number of a **vnd** device. If *vnu\_unit* is -1, information on the **vnd** device corresponding to the file descriptor passed to [ioctl(2)](/ioctl/2.md) will be returned. Otherwise, *vnu\_unit* may contain the unit number of another **vnd** device. This allows for opening just vnd0 and querying all available devices.

  ```
  struct vnd_user {
  	char	vnufile[VNDNLEN];
  	int	vnu_unit;
  	dev_t	vnu_dev;
  	ino_t	vnu_ino;
  };
  ```

Additionally, some [disklabel(8)](/disklabel/8.md) related [ioctl(2)](/ioctl/2.md) calls defined in ⟨sys/dkio.h⟩ are available: DIOCGDINFO, DIOCSDINFO, and DIOCWDINFO. They are documented in [sd(4)](/sd/4.md).

## FILES

- */dev/{,r}vnd\**

  **vnd** device special files

## SEE ALSO

[ioctl(2)](/ioctl/2.md), [sd(4)](/sd/4.md), [disklabel(5)](/disklabel/5.md), [config(8)](/config/8.md), [disklabel(8)](/disklabel/8.md), [fdisk(8)](/fdisk/8.md), [fsck(8)](/fsck/8.md), [MAKEDEV(8)](/MAKEDEV/8.md), [mount(8)](/mount/8.md), [newfs(8)](/newfs/8.md), [vnconfig(8)](/vnconfig/8.md)
