xref: /freebsd/usr.sbin/bhyveload/bhyveload.8 (revision f429b905b8221570f2a2f2344a8d47fc3a8bd425)
15239e66cSJoel Dahl.\"
283994ddcSNeel Natu.\" Copyright (c) 2012 NetApp Inc
383994ddcSNeel Natu.\" All rights reserved.
483994ddcSNeel Natu.\"
583994ddcSNeel Natu.\" Redistribution and use in source and binary forms, with or without
683994ddcSNeel Natu.\" modification, are permitted provided that the following conditions
783994ddcSNeel Natu.\" are met:
883994ddcSNeel Natu.\" 1. Redistributions of source code must retain the above copyright
983994ddcSNeel Natu.\"    notice, this list of conditions and the following disclaimer.
1083994ddcSNeel Natu.\" 2. Redistributions in binary form must reproduce the above copyright
1183994ddcSNeel Natu.\"    notice, this list of conditions and the following disclaimer in the
1283994ddcSNeel Natu.\"    documentation and/or other materials provided with the distribution.
1383994ddcSNeel Natu.\"
1483994ddcSNeel Natu.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1583994ddcSNeel Natu.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1683994ddcSNeel Natu.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1783994ddcSNeel Natu.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1883994ddcSNeel Natu.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1983994ddcSNeel Natu.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2083994ddcSNeel Natu.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2183994ddcSNeel Natu.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2283994ddcSNeel Natu.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2383994ddcSNeel Natu.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2483994ddcSNeel Natu.\" SUCH DAMAGE.
2583994ddcSNeel Natu.\"
2683994ddcSNeel Natu.\" $FreeBSD$
2783994ddcSNeel Natu.\"
2883994ddcSNeel Natu.Dd January 7, 2012
2983994ddcSNeel Natu.Dt BHYVELOAD 8
3083994ddcSNeel Natu.Os
3183994ddcSNeel Natu.Sh NAME
3283994ddcSNeel Natu.Nm bhyveload
3383994ddcSNeel Natu.Nd load a
3483994ddcSNeel Natu.Fx
3583994ddcSNeel Natuguest inside a bhyve virtual machine
3683994ddcSNeel Natu.Sh SYNOPSIS
3783994ddcSNeel Natu.Nm
389b1aa8d6SNeel Natu.Op Fl S
396380102cSPeter Grehan.Op Fl c Ar cons-dev
40cde1f5b8SJohn Baldwin.Op Fl d Ar disk-path
41cde1f5b8SJohn Baldwin.Op Fl e Ar name=value
42cde1f5b8SJohn Baldwin.Op Fl h Ar host-path
43cde1f5b8SJohn Baldwin.Op Fl m Ar mem-size
4483994ddcSNeel Natu.Ar vmname
4583994ddcSNeel Natu.Sh DESCRIPTION
4683994ddcSNeel Natu.Nm
4783994ddcSNeel Natuis used to load a
4883994ddcSNeel Natu.Fx
4983994ddcSNeel Natuguest inside a
5083994ddcSNeel Natu.Xr bhyve 4
5183994ddcSNeel Natuvirtual machine.
5283994ddcSNeel Natu.Pp
5383994ddcSNeel Natu.Nm
5483994ddcSNeel Natuis based on
5583994ddcSNeel Natu.Xr loader 8
56edccda4dSJoel Dahland will present an interface identical to the
5783994ddcSNeel Natu.Fx
5883994ddcSNeel Natuloader on the user's terminal.
5983994ddcSNeel Natu.Pp
6083994ddcSNeel NatuThe virtual machine is identified as
6183994ddcSNeel Natu.Ar vmname
6283994ddcSNeel Natuand will be created if it does not already exist.
6383994ddcSNeel Natu.Sh OPTIONS
6483994ddcSNeel NatuThe following options are available:
6583994ddcSNeel Natu.Bl -tag -width indent
66cde1f5b8SJohn Baldwin.It Fl c Ar cons-dev
67cde1f5b8SJohn Baldwin.Ar cons-dev
68cde1f5b8SJohn Baldwinis a
69cde1f5b8SJohn Baldwin.Xr tty 4
70cde1f5b8SJohn Baldwindevice to use for
71cde1f5b8SJohn Baldwin.Nm
72cde1f5b8SJohn Baldwinterminal I/O.
73cde1f5b8SJohn Baldwin.Pp
74cde1f5b8SJohn BaldwinThe text string "stdio" is also accepted and selects the use of
75cde1f5b8SJohn Baldwinunbuffered standard I/O. This is the default value.
76cde1f5b8SJohn Baldwin.It Fl d Ar disk-path
77cde1f5b8SJohn BaldwinThe
78cde1f5b8SJohn Baldwin.Ar disk-path
79cde1f5b8SJohn Baldwinis the pathname of the guest's boot disk image.
80cde1f5b8SJohn Baldwin.It Fl e Ar name=value
81cde1f5b8SJohn BaldwinSet the FreeBSD loader environment variable
82cde1f5b8SJohn Baldwin.Ar name
83cde1f5b8SJohn Baldwinto
84cde1f5b8SJohn Baldwin.Ar value .
85cde1f5b8SJohn Baldwin.Pp
86cde1f5b8SJohn BaldwinThe option may be used more than once to set more than one environment
87cde1f5b8SJohn Baldwinvariable.
88cde1f5b8SJohn Baldwin.It Fl h Ar host-path
89cde1f5b8SJohn BaldwinThe
90cde1f5b8SJohn Baldwin.Ar host-path
91cde1f5b8SJohn Baldwinis the directory at the top of the guest's boot filesystem.
92200758f1SNeel Natu.It Fl m Ar mem-size Xo
93200758f1SNeel Natu.Sm off
94200758f1SNeel Natu.Op Cm K | k | M | m | G | g | T | t
95200758f1SNeel Natu.Xc
96200758f1SNeel Natu.Sm on
97b060ba50SNeel Natu.Ar mem-size
98200758f1SNeel Natuis the amount of memory allocated to the guest.
99200758f1SNeel Natu.Pp
100200758f1SNeel NatuThe
101200758f1SNeel Natu.Ar mem-size
102200758f1SNeel Natuargument may be suffixed with one of
103200758f1SNeel Natu.Cm K ,
104200758f1SNeel Natu.Cm M ,
105200758f1SNeel Natu.Cm G
106200758f1SNeel Natuor
107200758f1SNeel Natu.Cm T
108200758f1SNeel Natu(either upper or lower case) to indicate a multiple of
109200758f1SNeel NatuKilobytes, Megabytes, Gigabytes or Terabytes
110200758f1SNeel Naturespectively.
11183994ddcSNeel Natu.Pp
11283994ddcSNeel NatuThe default value of
113b060ba50SNeel Natu.Ar mem-size
114200758f1SNeel Natuis 256M.
1159b1aa8d6SNeel Natu.It Fl S
1169b1aa8d6SNeel NatuWire guest memory.
1179b1aa8d6SNeel Natu.El
118*f429b905SNeel Natu.Sh EXAMPLES
11983994ddcSNeel NatuTo create a virtual machine named
12083994ddcSNeel Natu.Ar freebsd-vm
12183994ddcSNeel Natuthat boots off the ISO image
12283994ddcSNeel Natu.Pa /freebsd/release.iso
12383994ddcSNeel Natuand has 1GB memory allocated to it:
124edccda4dSJoel Dahl.Pp
125200758f1SNeel Natu.Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm"
1266380102cSPeter Grehan.Pp
1276380102cSPeter GrehanTo create a virtual machine named
1286380102cSPeter Grehan.Ar test-vm
1296380102cSPeter Grehanwith 256MB of memory allocated, the guest root filesystem under the host
1306380102cSPeter Grehandirectory
1316380102cSPeter Grehan.Pa /user/images/test
1326380102cSPeter Grehanand terminal I/O sent to the
1336380102cSPeter Grehan.Xr nmdm 4
1346380102cSPeter Grehandevice
1356380102cSPeter Grehan.Pa /dev/nmdm1B
1366380102cSPeter Grehan.Pp
1370947c55bSJoel Dahl.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm"
13883994ddcSNeel Natu.Sh SEE ALSO
13983994ddcSNeel Natu.Xr bhyve 4 ,
1406380102cSPeter Grehan.Xr nmdm 4 ,
141b540294aSMaxim Konovalov.Xr vmm 4 ,
142b540294aSMaxim Konovalov.Xr bhyve 8 ,
143b540294aSMaxim Konovalov.Xr loader 8
14483994ddcSNeel Natu.Sh HISTORY
14583994ddcSNeel Natu.Nm
14683994ddcSNeel Natufirst appeared in
14783994ddcSNeel Natu.Fx 10.0 ,
14883994ddcSNeel Natuand was developed at NetApp Inc.
14983994ddcSNeel Natu.Sh AUTHORS
15083994ddcSNeel Natu.Nm
15183994ddcSNeel Natuwas developed by
15283994ddcSNeel Natu.An -nosplit
15301c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@FreeBSD.org
15483994ddcSNeel Natuat NetApp Inc with a lot of help from
15501c2b8acSBaptiste Daroussin.An Doug Rabson Aq Mt dfr@FreeBSD.org .
15683994ddcSNeel Natu.Sh BUGS
15783994ddcSNeel Natu.Nm
158edccda4dSJoel Dahlcan only load
15983994ddcSNeel Natu.Fx
16083994ddcSNeel Natuas a guest.
161