OpenBSD manual page server

Manual Page Search Parameters

VM.CONF(5) File Formats Manual VM.CONF(5)

vm.confvirtual machine configuration

vm.conf is the configuration file to configure the virtual machine monitor (VMM) subsystem. A VMM manages virtual machines (VMs) on a host. The VMM subsystem is responsible for creating, destroying, and executing VMs.

vm.conf is divided into three main sections:

User-defined variables may be defined and used later, simplifying the configuration file.
Configuration for each individual virtual machine.

Within the sections, the bytes argument can be specified with a human-readable scale, using the format described in scan_scaled(3).

The current line can be extended over multiple lines using a backslash (‘\’). Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block.

Argument names not beginning with a letter, digit, underscore, or slash must be quoted.

Additional configuration files can be included with the include keyword, for example:

include "/etc/vm1.example.com.conf"

Macros can be defined that will later be expanded in context. Macro names must start with a letter, digit, or underscore, and may contain any of those characters. Macro names may not be reserved words (for example, vm, memory, or disk). Macros are not expanded inside quotes.

For example:

ramdisk="/bsd.rd"
vm "vm1.example.com" {
	memory 512M
	kernel $ramdisk
}

Each vm section starts with a declaration of the virtual machine name:

name {...}
This name can be any string, and is typically a hostname.

Followed by a block of parameters that is enclosed in curly brackets:

Automatically start the VM. This is the default if neither enable nor disable is specified.
Do not start this VM.
path
Disk image file (may be specified multiple times to add multiple disk images).
path
Kernel to load when booting the VM.
bytes
Memory size of the VM, in bytes, rounded to megabytes.
count
Number of network interfaces to add to the VM.

Create a new VM with 512MB memory, 1 network interface, one disk image ('disk.img') and boot from kernel '/bsd':

vm "vm2.example.com" {
	memory 512M
	interfaces 1
	disk "/var/vmm/vm2-disk.img"
	kernel "/bsd"
}

vmm(4), vmctl(8), vmd(8)

The vm.conf file format first appeared in OpenBSD 5.9.

Mike Larkin <mlarkin@openbsd.org> and Reyk Floeter <reyk@openbsd.org>.

December 7, 2015 OpenBSD-5.9