set

Set the value of a configuration variable

Synopsis:

set var val

Options:

The set option supports the following variable types:

  • address — use any of the forms permitted for memory sizes when you specify val (e.g., 4K, 0d16384); for more information, see About notation
  • boolean — any of the following values are equivalent; the first term turns on the feature, the second turns it off: on/off, 1/0, yes/no, true/false
  • tristate — the following values are permitted:
    • on — the feature is always on
    • off — the feature is always off
    • auto — the feature's setting is automatically detected by qvm
  • number — any positive integer that can be expressed with 64 bits; decimal notation (no prefix) and hexadecimal notation (prefixed with 0x) are permitted; for more information, see About notation
  • string — a text string, used as is
Note:
For descriptions of all variables (i.e., var values) supported on a given platform, including the variable types (i.e., possible val values), see Configuration variables.

Description:

Each set var val argument pair defines a variable setting that applies to an implicit context. This is different than the VM configuration file notion of a context, which is a group of related configuration options (for details, see Contexts in the VM configuration syntax topic). The implicit context to which each variable applies is noted in its description. Supported implicit contexts include:

  • global — applies to the VM (qvm process instance) currently being configured
  • CPU — applies to the vCPU currently being configured
  • vdev — applies to the vdev currently being configured
You can display information on the currently permitted variables. For example, in a shell prompt in the host, type:
# qvm set ?
You should see the variable names along with their types and contexts in a listing like the following:
allowed set variables
    legacy-free                    (boolean, global)
    message-block-timeout          (number, global)
    posted-interrupts              (boolean, global)
    virtual-interrupts             (boolean, global)

A question mark (?) is a shell wildcard character, so you may need to escape it. If a vdev defines its own variables, ? will list these only after a vdev option has loaded the vdev where these variables are specified.

Page updated: