xref: /freebsd/usr.sbin/bhyveload/bhyveload.8 (revision d6b92ffa)
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 June 24, 2016
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 C
39.Op Fl S
40.Op Fl c Ar cons-dev
41.Op Fl d Ar disk-path
42.Op Fl e Ar name=value
43.Op Fl h Ar host-path
44.Op Fl l Ar os-loader
45.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
46.Ar vmname
47.Sh DESCRIPTION
48.Nm
49is used to load a
50.Fx
51guest inside a
52.Xr bhyve 4
53virtual machine.
54.Pp
55.Nm
56is based on
57.Xr loader 8
58and will present an interface identical to the
59.Fx
60loader on the user's terminal.
61This behavior can be changed by specifying a different OS loader.
62.Pp
63The virtual machine is identified as
64.Ar vmname
65and will be created if it does not already exist.
66.Sh OPTIONS
67The following options are available:
68.Bl -tag -width indent
69.It Fl c Ar cons-dev
70.Ar cons-dev
71is a
72.Xr tty 4
73device to use for
74.Nm
75terminal I/O.
76.Pp
77The text string "stdio" is also accepted and selects the use of
78unbuffered standard I/O. This is the default value.
79.It Fl d Ar disk-path
80The
81.Ar disk-path
82is the pathname of the guest's boot disk image.
83.It Fl e Ar name=value
84Set the
85.Fx
86loader environment variable
87.Ar name
88to
89.Ar value .
90.Pp
91The option may be used more than once to set more than one environment
92variable.
93.It Fl h Ar host-path
94The
95.Ar host-path
96is the directory at the top of the guest's boot filesystem.
97.It Fl l Ar os-loader
98Specify a different OS loader.
99By default
100.Nm
101will use
102.Pa /boot/userboot.so ,
103which presents a standard
104.Fx
105loader.
106.It Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
107.Ar memsize
108is the amount of memory allocated to the guest.
109.Pp
110The
111.Ar memsize
112argument may be suffixed with one of
113.Cm K ,
114.Cm M ,
115.Cm G
116or
117.Cm T
118(either upper or lower case) to indicate a multiple of
119Kilobytes, Megabytes, Gigabytes or Terabytes
120respectively.
121.Pp
122.Ar memsize
123defaults to 256M.
124.It Fl C
125Include guest memory in the core file when
126.Nm
127dumps core.
128This is intended for debugging an OS loader as it allows inspection of
129the guest memory.
130.It Fl S
131Wire guest memory.
132.El
133.Sh EXAMPLES
134To create a virtual machine named
135.Ar freebsd-vm
136that boots off the ISO image
137.Pa /freebsd/release.iso
138and has 1GB memory allocated to it:
139.Pp
140.Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm"
141.Pp
142To create a virtual machine named
143.Ar test-vm
144with 256MB of memory allocated, the guest root filesystem under the host
145directory
146.Pa /user/images/test
147and terminal I/O sent to the
148.Xr nmdm 4
149device
150.Pa /dev/nmdm1B
151.Pp
152.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm"
153.Sh SEE ALSO
154.Xr bhyve 4 ,
155.Xr nmdm 4 ,
156.Xr vmm 4 ,
157.Xr bhyve 8 ,
158.Xr loader 8
159.Sh HISTORY
160.Nm
161first appeared in
162.Fx 10.0 ,
163and was developed at NetApp Inc.
164.Sh AUTHORS
165.Nm
166was developed by
167.An -nosplit
168.An Neel Natu Aq Mt neel@FreeBSD.org
169at NetApp Inc with a lot of help from
170.An Doug Rabson Aq Mt dfr@FreeBSD.org .
171.Sh BUGS
172.Nm
173can only load
174.Fx
175as a guest.
176