xref: /openbsd/usr.sbin/hostctl/hostctl.8 (revision 5af055cd)
1.\" $OpenBSD: hostctl.8,v 1.3 2016/01/27 16:01:36 jmc Exp $
2.\"
3.\" Copyright (c) 2016 Reyk Floeter <reyk@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: January 27 2016 $
18.Dt HOSTCTL 8
19.Os
20.Sh NAME
21.Nm hostctl
22.Nd display or modify contents of the host's key-value store
23.Sh SYNOPSIS
24.Nm
25.Op Fl qt
26.Op Fl f Ar device
27.Op Fl i Ar input
28.Op Fl o Ar output
29.Ar key
30.Op Ar value
31.Sh DESCRIPTION
32The
33.Nm
34program provides a generic interface for accessing key-value stores on
35the system's host.
36It is primarily used for an abstracted way to exchange information
37with hypervisors that are supported by the
38.Xr pvbus 4
39subsystem.
40When given the name of a specific
41.Ar key ,
42.Nm
43will display the value or list the key names of the subtree.
44If the key is followed by a
45.Ar value ,
46.Nm
47will write the new key-value pair to the key-value store.
48.Pp
49The options are as follows:
50.Bl -tag -width Ds
51.It Fl f Ar device
52Use
53.Ar device
54instead of the default
55.Pa /dev/pvbus0 .
56.It Fl i Ar input
57Read the new value for the specified
58.Ar key
59from the
60.Ar input
61file.
62.It Fl o Ar output
63Save the returned value in the
64.Ar output
65file.
66.It Fl q
67Don't ask for confirmation of any default options.
68.It Fl t
69Print the type of the underlying driver.
70.El
71.Sh FILES
72.Bl -tag -width "/dev/pvbusX" -compact
73.It /dev/pvbus Ns Ar u
74.Xr pvbus 4
75device unit
76.Ar u
77file.
78.El
79.Sh EXAMPLES
80The
81.Xr vmt 4
82driver provides access to the
83.Dq guestinfo
84information that is available in VMware virtual machines:
85.Bd -literal -offset indent
86# hostctl guestinfo.hostname
87vm-111.example.com
88# hostctl guestinfo.ip 192.168.100.111
89.Ed
90.Pp
91The
92.Xr xen 4
93driver provices access to the XenStore that is available in Xen
94virtual machines.
95The
96.Xr pvbus 4
97layer abstracts it as a simple key-value interface:
98.Bd -literal -offset indent
99# hostctl device/vif/0/mac
100fe:e1:ba:d0:27:0f
101# hostctl device/vif/0/description "My interface"
102.Ed
103.Pp
104The XenStore is a virtual filesystem that also provides directories.
105The directory name can be specified as a key to return the contents,
106other keys, of the directory:
107.Bd -literal -offset indent
108# hostctl device
109vfb
110vbd
111vif
112console
113.Ed
114.Sh SEE ALSO
115.Xr pvbus 4
116.Sh HISTORY
117The
118.Nm
119program first appeared in
120.Ox 5.9 .
121.Sh AUTHORS
122The
123.Nm
124program was written by
125.An Reyk Floeter Aq Mt reyk@openbsd.org .
126