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