OpenBSD manual page server

Manual Page Search Parameters

VMM(4) Device Drivers Manual (amd64) VMM(4)

vmm — virtual machine monitor

vmm0 at mainbus0


#include <machine/vmmvar.h>

The vmm driver implements a virtual machine monitor (VMM) suitable for executing (VMs). A VMM runs on the operating system and provides facilities to execute one or more VMs, each of which is provided with a suitable complement of virtual hardware.

These VMs run independently of the host, but may interact with it as any other machine would (e.g. via network communications or other means).

VMs are allocated hardware resources by the VMM during creation, including:

Although VMs execute independently of each other and the host, they do consume host resources and, as such, the number of VMs (and their configurations) should be taken into consideration when planning host capacity.

The vmm driver requires suitable host CPU capabilities in order to provide VM services. The vmm driver requires at least one CPU with hardware-assisted virtualization capabilities and nested or extended paging capabilities to be present on the host. For more information, consult the CPU vendor's documentation.

The following ioctl(2) commands are provided through two interfaces:

/dev/vmm
Control device for creating VMs.
VM file descriptor
Per-VM handle returned by VMM_IOC_CREATE. The lifetime of a VM is tied to this descriptor. Closing the last reference to it tears down the VM.

The following ioctl call applies to the /dev/vmm control device:

struct vm_create_params *
Create a VM via /dev/vmm, initializing vmm if not yet started. Returns a VM file descriptor in vcp_fd. (Does not start the VCPU.)

The following ioctl calls apply to the VM file descriptor returned by VMM_IOC_CREATE.

struct vm_run_params *
Run a VCPU and return on VM-exit, when the VCPU stopped, or on error.
struct vm_resetcpu_params *
Reset a VCPU to power-on-init state using the provided register state.
struct vm_intr_params *
Signal a pending interrupt for a VCPU.
struct vm_rwregs_params *
Read registers of a VCPU.
struct vm_rwregs_params *
Write register values of a VCPU.
struct vm_rwvmparams_params *
Read paravirtualized hardware parameters (such as pvclock(4) version) for a VM.
struct vm_rwvmparams_params *
Write paravirtualized hardware parameters (such as pvclock(4) guest physical address) for a VM.
struct vm_sharemem_params *
Create shared mappings for the VM memory ranges into the calling process.

cpu(4), intro(4), virtio(4), vmctl(8), vmd(8)

The vmm driver appeared in OpenBSD 5.9.

Mike Larkin <mlarkin@openbsd.org>

OpenBSD-current September 19, 2026 VMM(4)