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.\" 28*568e3a8dSMarcel Moolenaar.Dd February 26, 2016 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 38*568e3a8dSMarcel Moolenaar.Op Fl C 399b1aa8d6SNeel Natu.Op Fl S 406380102cSPeter Grehan.Op Fl c Ar cons-dev 41cde1f5b8SJohn Baldwin.Op Fl d Ar disk-path 42cde1f5b8SJohn Baldwin.Op Fl e Ar name=value 43cde1f5b8SJohn Baldwin.Op Fl h Ar host-path 448c96dcc1SMarcel Moolenaar.Op Fl l Ar os-loader 45cde1f5b8SJohn Baldwin.Op Fl m Ar mem-size 4683994ddcSNeel Natu.Ar vmname 4783994ddcSNeel Natu.Sh DESCRIPTION 4883994ddcSNeel Natu.Nm 4983994ddcSNeel Natuis used to load a 5083994ddcSNeel Natu.Fx 5183994ddcSNeel Natuguest inside a 5283994ddcSNeel Natu.Xr bhyve 4 5383994ddcSNeel Natuvirtual machine. 5483994ddcSNeel Natu.Pp 5583994ddcSNeel Natu.Nm 5683994ddcSNeel Natuis based on 5783994ddcSNeel Natu.Xr loader 8 58edccda4dSJoel Dahland will present an interface identical to the 5983994ddcSNeel Natu.Fx 6083994ddcSNeel Natuloader on the user's terminal. 618c96dcc1SMarcel MoolenaarThis behavior can be changed by specifying a different OS loader. 6283994ddcSNeel Natu.Pp 6383994ddcSNeel NatuThe virtual machine is identified as 6483994ddcSNeel Natu.Ar vmname 6583994ddcSNeel Natuand will be created if it does not already exist. 6683994ddcSNeel Natu.Sh OPTIONS 6783994ddcSNeel NatuThe following options are available: 6883994ddcSNeel Natu.Bl -tag -width indent 69cde1f5b8SJohn Baldwin.It Fl c Ar cons-dev 70cde1f5b8SJohn Baldwin.Ar cons-dev 71cde1f5b8SJohn Baldwinis a 72cde1f5b8SJohn Baldwin.Xr tty 4 73cde1f5b8SJohn Baldwindevice to use for 74cde1f5b8SJohn Baldwin.Nm 75cde1f5b8SJohn Baldwinterminal I/O. 76cde1f5b8SJohn Baldwin.Pp 77cde1f5b8SJohn BaldwinThe text string "stdio" is also accepted and selects the use of 78cde1f5b8SJohn Baldwinunbuffered standard I/O. This is the default value. 79cde1f5b8SJohn Baldwin.It Fl d Ar disk-path 80cde1f5b8SJohn BaldwinThe 81cde1f5b8SJohn Baldwin.Ar disk-path 82cde1f5b8SJohn Baldwinis the pathname of the guest's boot disk image. 83cde1f5b8SJohn Baldwin.It Fl e Ar name=value 848c96dcc1SMarcel MoolenaarSet the 858c96dcc1SMarcel Moolenaar.Fx 868c96dcc1SMarcel Moolenaarloader environment variable 87cde1f5b8SJohn Baldwin.Ar name 88cde1f5b8SJohn Baldwinto 89cde1f5b8SJohn Baldwin.Ar value . 90cde1f5b8SJohn Baldwin.Pp 91cde1f5b8SJohn BaldwinThe option may be used more than once to set more than one environment 92cde1f5b8SJohn Baldwinvariable. 93cde1f5b8SJohn Baldwin.It Fl h Ar host-path 94cde1f5b8SJohn BaldwinThe 95cde1f5b8SJohn Baldwin.Ar host-path 96cde1f5b8SJohn Baldwinis the directory at the top of the guest's boot filesystem. 978c96dcc1SMarcel Moolenaar.It Fl l Ar os-loader 988c96dcc1SMarcel MoolenaarSpecify a different OS loader. 998c96dcc1SMarcel MoolenaarBy default 1008c96dcc1SMarcel Moolenaar.Nm 1018c96dcc1SMarcel Moolenaarwill use 1028c96dcc1SMarcel Moolenaar.Pa /boot/userboot.so , 1038c96dcc1SMarcel Moolenaarwhich presents a standard 1048c96dcc1SMarcel Moolenaar.Fx 1058c96dcc1SMarcel Moolenaarloader. 106200758f1SNeel Natu.It Fl m Ar mem-size Xo 107200758f1SNeel Natu.Sm off 108200758f1SNeel Natu.Op Cm K | k | M | m | G | g | T | t 109200758f1SNeel Natu.Xc 110200758f1SNeel Natu.Sm on 111b060ba50SNeel Natu.Ar mem-size 112200758f1SNeel Natuis the amount of memory allocated to the guest. 113200758f1SNeel Natu.Pp 114200758f1SNeel NatuThe 115200758f1SNeel Natu.Ar mem-size 116200758f1SNeel Natuargument may be suffixed with one of 117200758f1SNeel Natu.Cm K , 118200758f1SNeel Natu.Cm M , 119200758f1SNeel Natu.Cm G 120200758f1SNeel Natuor 121200758f1SNeel Natu.Cm T 122200758f1SNeel Natu(either upper or lower case) to indicate a multiple of 123200758f1SNeel NatuKilobytes, Megabytes, Gigabytes or Terabytes 124200758f1SNeel Naturespectively. 12583994ddcSNeel Natu.Pp 12683994ddcSNeel NatuThe default value of 127b060ba50SNeel Natu.Ar mem-size 128200758f1SNeel Natuis 256M. 129*568e3a8dSMarcel Moolenaar.It Fl C 130*568e3a8dSMarcel MoolenaarInclude guest memory in the core file when 131*568e3a8dSMarcel Moolenaar.Nm 132*568e3a8dSMarcel Moolenaardumps core. 133*568e3a8dSMarcel MoolenaarThis is intended for debugging an OS loader as it allows inspection of 134*568e3a8dSMarcel Moolenaarthe guest memory. 1359b1aa8d6SNeel Natu.It Fl S 1369b1aa8d6SNeel NatuWire guest memory. 1379b1aa8d6SNeel Natu.El 138f429b905SNeel Natu.Sh EXAMPLES 13983994ddcSNeel NatuTo create a virtual machine named 14083994ddcSNeel Natu.Ar freebsd-vm 14183994ddcSNeel Natuthat boots off the ISO image 14283994ddcSNeel Natu.Pa /freebsd/release.iso 14383994ddcSNeel Natuand has 1GB memory allocated to it: 144edccda4dSJoel Dahl.Pp 145200758f1SNeel Natu.Dl "bhyveload -m 1G -d /freebsd/release.iso freebsd-vm" 1466380102cSPeter Grehan.Pp 1476380102cSPeter GrehanTo create a virtual machine named 1486380102cSPeter Grehan.Ar test-vm 1496380102cSPeter Grehanwith 256MB of memory allocated, the guest root filesystem under the host 1506380102cSPeter Grehandirectory 1516380102cSPeter Grehan.Pa /user/images/test 1526380102cSPeter Grehanand terminal I/O sent to the 1536380102cSPeter Grehan.Xr nmdm 4 1546380102cSPeter Grehandevice 1556380102cSPeter Grehan.Pa /dev/nmdm1B 1566380102cSPeter Grehan.Pp 1570947c55bSJoel Dahl.Dl "bhyveload -m 256MB -h /usr/images/test -c /dev/nmdm1B test-vm" 15883994ddcSNeel Natu.Sh SEE ALSO 15983994ddcSNeel Natu.Xr bhyve 4 , 1606380102cSPeter Grehan.Xr nmdm 4 , 161b540294aSMaxim Konovalov.Xr vmm 4 , 162b540294aSMaxim Konovalov.Xr bhyve 8 , 163b540294aSMaxim Konovalov.Xr loader 8 16483994ddcSNeel Natu.Sh HISTORY 16583994ddcSNeel Natu.Nm 16683994ddcSNeel Natufirst appeared in 16783994ddcSNeel Natu.Fx 10.0 , 16883994ddcSNeel Natuand was developed at NetApp Inc. 16983994ddcSNeel Natu.Sh AUTHORS 17083994ddcSNeel Natu.Nm 17183994ddcSNeel Natuwas developed by 17283994ddcSNeel Natu.An -nosplit 17301c2b8acSBaptiste Daroussin.An Neel Natu Aq Mt neel@FreeBSD.org 17483994ddcSNeel Natuat NetApp Inc with a lot of help from 17501c2b8acSBaptiste Daroussin.An Doug Rabson Aq Mt dfr@FreeBSD.org . 17683994ddcSNeel Natu.Sh BUGS 17783994ddcSNeel Natu.Nm 178edccda4dSJoel Dahlcan only load 17983994ddcSNeel Natu.Fx 18083994ddcSNeel Natuas a guest. 181