VM.CONF(5)

NAME
vm.conf - virtual machine configuration

DESCRIPTION
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.

SECTIONS
vm.conf is divided into three main sections:

Macros
    User-defined variables may be defined and used later, simplifying the configuration file.

VM Configuration
    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
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
    }

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

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

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

enable
    Automatically start the VM. This is the default if neither enable nor disable is specified.

disable
    Do not start this VM.

disk path
    Disk image file (may be specified multiple times to add multiple disk images).

kernel path
    Kernel to load when booting the VM.

memory bytes
    Memory size of the VM, in bytes, rounded to megabytes.

interfaces count
    Number of network interfaces to add to the VM.

EXAMPLES
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"
    }

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

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

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