xref: /freebsd/usr.sbin/bhyveload/bhyveload.8 (revision a0ee8cc6)
1.\"
2.\" Copyright (c) 2012 NetApp Inc
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd October 7, 2015
29.Dt BHYVELOAD 8
30.Os
31.Sh NAME
32.Nm bhyveload
33.Nd load a
34.Fx
35guest inside a bhyve virtual machine
36.Sh SYNOPSIS
37.Nm
38.Op Fl S
39.Op Fl c Ar cons-dev
40.Op Fl d Ar disk-path
41.Op Fl e Ar name=value
42.Op Fl h Ar host-path
43.Op Fl l Ar os-loader
44.Op Fl m Ar mem-size
45.Ar vmname
46.Sh DESCRIPTION
47.Nm
48is used to load a
49.Fx
50guest inside a
51.Xr bhyve 4
52virtual machine.
53.Pp
54.Nm
55is based on
56.Xr loader 8
57and will present an interface identical to the
58.Fx
59loader on the user's terminal.
60This behavior can be changed by specifying a different OS loader.
61.Pp
62The virtual machine is identified as
63.Ar vmname
64and will be created if it does not already exist.
65.Sh OPTIONS
66The following options are available:
67.Bl -tag -width indent
68.It Fl c Ar cons-dev
69.Ar cons-dev
70is a
71.Xr tty 4
72device to use for
73.Nm
74terminal I/O.
75.Pp
76The text string "stdio" is also accepted and selects the use of
77unbuffered standard I/O. This is the default value.
78.It Fl d Ar disk-path
79The
80.Ar disk-path
81is the pathname of the guest's boot disk image.
82.It Fl e Ar name=value
83Set the
84.Fx
85loader environment variable
86.Ar name
87to
88.Ar value .
89.Pp
90The option may be used more than once to set more than one environment
91variable.
92.It Fl h Ar host-path
93The
94.Ar host-path
95is the directory at the top of the guest's boot filesystem.
96.It Fl l Ar os-loader
97Specify a different OS loader.
98By default
99.Nm
100will use
101.Pa /boot/userboot.so ,
102which presents a standard
103.Fx
104loader.
105.It Fl m Ar mem-size Xo
106.Sm off
107.Op Cm K | k | M | m | G | g | T | t
108.Xc
109.Sm on
110.Ar mem-size
111is the amount of memory allocated to the guest.
112.Pp
113The
114.Ar mem-size
115argument may be suffixed with one of
116.Cm K ,
117.Cm M ,
118.Cm G
119or
120.Cm T
121(either upper or lower case) to indicate a multiple of
122Kilobytes, Megabytes, Gigabytes or Terabytes
123respectively.
124.Pp
125The default value of
126.Ar mem-size
127is 256M.
128.It Fl S
129Wire guest memory.
130.El
131.Sh EXAMPLES
132To create a virtual machine named
133.Ar freebsd-vm
134that boots off the ISO image
135.Pa /freebsd/release.iso
136and has 1GB memory allocated to it:
137.Pp
138.Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm"
139.Pp
140To create a virtual machine named
141.Ar test-vm
142with 256MB of memory allocated, the guest root filesystem under the host
143directory
144.Pa /user/images/test
145and terminal I/O sent to the
146.Xr nmdm 4
147device
148.Pa /dev/nmdm1B
149.Pp
150.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm"
151.Sh SEE ALSO
152.Xr bhyve 4 ,
153.Xr nmdm 4 ,
154.Xr vmm 4 ,
155.Xr bhyve 8 ,
156.Xr loader 8
157.Sh HISTORY
158.Nm
159first appeared in
160.Fx 10.0 ,
161and was developed at NetApp Inc.
162.Sh AUTHORS
163.Nm
164was developed by
165.An -nosplit
166.An Neel Natu Aq Mt neel@FreeBSD.org
167at NetApp Inc with a lot of help from
168.An Doug Rabson Aq Mt dfr@FreeBSD.org .
169.Sh BUGS
170.Nm
171can only load
172.Fx
173as a guest.
174