xref: /openbsd-src/usr.sbin/hostctl/hostctl.8 (revision e6febc003a44f5327c2caf2795a480fa19b8fdc3)
1*e6febc00Smikeb.\" $OpenBSD: hostctl.8,v 1.5 2017/07/21 20:58:07 mikeb Exp $
26fc48f48Sreyk.\"
36fc48f48Sreyk.\" Copyright (c) 2016 Reyk Floeter <reyk@openbsd.org>
46fc48f48Sreyk.\"
56fc48f48Sreyk.\" Permission to use, copy, modify, and distribute this software for any
66fc48f48Sreyk.\" purpose with or without fee is hereby granted, provided that the above
76fc48f48Sreyk.\" copyright notice and this permission notice appear in all copies.
86fc48f48Sreyk.\"
96fc48f48Sreyk.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
106fc48f48Sreyk.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
116fc48f48Sreyk.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
126fc48f48Sreyk.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
136fc48f48Sreyk.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
146fc48f48Sreyk.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
156fc48f48Sreyk.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
166fc48f48Sreyk.\"
17*e6febc00Smikeb.Dd $Mdocdate: July 21 2017 $
186fc48f48Sreyk.Dt HOSTCTL 8
196fc48f48Sreyk.Os
206fc48f48Sreyk.Sh NAME
216fc48f48Sreyk.Nm hostctl
226fc48f48Sreyk.Nd display or modify contents of the host's key-value store
236fc48f48Sreyk.Sh SYNOPSIS
246fc48f48Sreyk.Nm
256fc48f48Sreyk.Op Fl qt
266fc48f48Sreyk.Op Fl f Ar device
276fc48f48Sreyk.Op Fl i Ar input
286fc48f48Sreyk.Op Fl o Ar output
296fc48f48Sreyk.Ar key
306fc48f48Sreyk.Op Ar value
316fc48f48Sreyk.Sh DESCRIPTION
326fc48f48SreykThe
336fc48f48Sreyk.Nm
346fc48f48Sreykprogram provides a generic interface for accessing key-value stores on
356fc48f48Sreykthe system's host.
366fc48f48SreykIt is primarily used for an abstracted way to exchange information
376fc48f48Sreykwith hypervisors that are supported by the
386fc48f48Sreyk.Xr pvbus 4
396fc48f48Sreyksubsystem.
406fc48f48SreykWhen given the name of a specific
416fc48f48Sreyk.Ar key ,
426fc48f48Sreyk.Nm
436fc48f48Sreykwill display the value or list the key names of the subtree.
446fc48f48SreykIf the key is followed by a
456fc48f48Sreyk.Ar value ,
466fc48f48Sreyk.Nm
476fc48f48Sreykwill write the new key-value pair to the key-value store.
486fc48f48Sreyk.Pp
496fc48f48SreykThe options are as follows:
506fc48f48Sreyk.Bl -tag -width Ds
516fc48f48Sreyk.It Fl f Ar device
526fc48f48SreykUse
536fc48f48Sreyk.Ar device
546fc48f48Sreykinstead of the default
556fc48f48Sreyk.Pa /dev/pvbus0 .
566fc48f48Sreyk.It Fl i Ar input
576fc48f48SreykRead the new value for the specified
586fc48f48Sreyk.Ar key
596fc48f48Sreykfrom the
606fc48f48Sreyk.Ar input
616fc48f48Sreykfile.
626fc48f48Sreyk.It Fl o Ar output
636fc48f48SreykSave the returned value in the
646fc48f48Sreyk.Ar output
656fc48f48Sreykfile.
66883e45adSjmc.It Fl q
67883e45adSjmcDon't ask for confirmation of any default options.
68883e45adSjmc.It Fl t
69883e45adSjmcPrint the type of the underlying driver.
706fc48f48Sreyk.El
71*e6febc00Smikeb.Pp
72*e6febc00SmikebMultiple hypervisor interfaces and key-value stores can be simultaneously
73*e6febc00Smikebavailable and reached through different device nodes.
746fc48f48Sreyk.Sh FILES
756fc48f48Sreyk.Bl -tag -width "/dev/pvbusX" -compact
766fc48f48Sreyk.It /dev/pvbus Ns Ar u
776fc48f48Sreyk.Xr pvbus 4
786fc48f48Sreykdevice unit
796fc48f48Sreyk.Ar u
806fc48f48Sreykfile.
816fc48f48Sreyk.El
826fc48f48Sreyk.Sh EXAMPLES
836fc48f48SreykThe
846fc48f48Sreyk.Xr vmt 4
856fc48f48Sreykdriver provides access to the
866fc48f48Sreyk.Dq guestinfo
876fc48f48Sreykinformation that is available in VMware virtual machines:
886fc48f48Sreyk.Bd -literal -offset indent
896fc48f48Sreyk# hostctl guestinfo.hostname
906fc48f48Sreykvm-111.example.com
916fc48f48Sreyk# hostctl guestinfo.ip 192.168.100.111
926fc48f48Sreyk.Ed
936fc48f48Sreyk.Pp
946fc48f48SreykThe
956fc48f48Sreyk.Xr xen 4
96aeedbdddSmikebdriver provides access to the XenStore that is available in Xen
976fc48f48Sreykvirtual machines.
986fc48f48SreykThe
996fc48f48Sreyk.Xr pvbus 4
1006fc48f48Sreyklayer abstracts it as a simple key-value interface:
1016fc48f48Sreyk.Bd -literal -offset indent
1026fc48f48Sreyk# hostctl device/vif/0/mac
1036fc48f48Sreykfe:e1:ba:d0:27:0f
1046fc48f48Sreyk# hostctl device/vif/0/description "My interface"
1056fc48f48Sreyk.Ed
1066fc48f48Sreyk.Pp
1076fc48f48SreykThe XenStore is a virtual filesystem that also provides directories.
1086fc48f48SreykThe directory name can be specified as a key to return the contents,
1096fc48f48Sreykother keys, of the directory:
1106fc48f48Sreyk.Bd -literal -offset indent
1116fc48f48Sreyk# hostctl device
1126fc48f48Sreykvfb
1136fc48f48Sreykvbd
1146fc48f48Sreykvif
1156fc48f48Sreykconsole
1166fc48f48Sreyk.Ed
117aeedbdddSmikeb.Pp
118aeedbdddSmikebAccess to the Hyper-V Key-Value Pair exchange interface is provided by the
119aeedbdddSmikeb.Xr hyperv 4
120aeedbdddSmikebdriver.
121aeedbdddSmikebThe
122aeedbdddSmikeb.Xr pvbus 4
123aeedbdddSmikeblayer abstracts access to several pre-defined key pools:
124aeedbdddSmikeb.Em Auto ,
125aeedbdddSmikeb.Em Guest ,
126aeedbdddSmikeb.Em External
127aeedbdddSmikeband
128aeedbdddSmikeb.Em Guest/Parameters .
129aeedbdddSmikebAvailable keys can be listed and set:
130aeedbdddSmikeb.Bd -literal -offset indent
131aeedbdddSmikeb# hostctl Auto/
132aeedbdddSmikebFullyQualifiedDomainName
133aeedbdddSmikebIntegrationServicesVersion
134aeedbdddSmikebNetworkAddressIPv4
135aeedbdddSmikebNetworkAddressIPv6
136aeedbdddSmikebOSBuildNumber
137aeedbdddSmikebOSName
138aeedbdddSmikebOSMajorVersion
139aeedbdddSmikebOSMinorVersion
140aeedbdddSmikebOSVersion
141aeedbdddSmikebProcessorArchitecture
142aeedbdddSmikeb# hostctl Auto/FullyQualifiedDomainName `hostname`
143aeedbdddSmikeb.Ed
1446fc48f48Sreyk.Sh SEE ALSO
1456fc48f48Sreyk.Xr pvbus 4
1466fc48f48Sreyk.Sh HISTORY
1476fc48f48SreykThe
1486fc48f48Sreyk.Nm
1496fc48f48Sreykprogram first appeared in
1506fc48f48Sreyk.Ox 5.9 .
1516fc48f48Sreyk.Sh AUTHORS
1526fc48f48SreykThe
1536fc48f48Sreyk.Nm
1546fc48f48Sreykprogram was written by
1556fc48f48Sreyk.An Reyk Floeter Aq Mt reyk@openbsd.org .
156