HOSTCTL(8)

NAME
hostctl - display or modify contents of the host's key-value store

SYNOPSIS
hostctl [-qt] [-f device] [-i input] [-o output] key [value]

DESCRIPTION
The hostctl program provides a generic interface for accessing key-value stores on the system's host. It is primarily used for an abstracted way to exchange information with hypervisors that are supported by the pvbus(4) subsystem. When given the name of a specific key, hostctl will display the value or list the key names of the subtree. If the key is followed by a value, hostctl will write the new key-value pair to the key-value store.

The options are as follows:

-f device
    Use device instead of the default /dev/pvbus0.

-i input
    Read the new value for the specified key from the input file.

-o output
    Save the returned value in the output file.

-q  Don't ask for confirmation of any default options.

-t  Print the type of the underlying driver.

FILES
/dev/pvbusu
    pvbus(4) device unit u file.

EXAMPLES
The vmt(4) driver provides access to the “guestinfo” information that is available in VMware virtual machines:

    # hostctl guestinfo.hostname
    vm-111.example.com
    # hostctl guestinfo.ip 192.168.100.111

The xen(4) driver provices access to the XenStore that is available in Xen virtual machines. The pvbus(4) layer abstracts it as a simple key-value interface:

    # hostctl device/vif/0/mac
    fe:e1:ba:d0:27:0f
    # hostctl device/vif/0/description "My interface"

The XenStore is a virtual filesystem that also provides directories. The directory name can be specified as a key to return the contents, other keys, of the directory:

    # hostctl device
    vfb
    vbd
    vif
    console

SEE ALSO
pvbus(4)

HISTORY
The hostctl program first appeared in OpenBSD 5.9.

AUTHORS
The hostctl program was written by Reyk Floeter <reyk@openbsd.org>.