Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VMM(4)			    Kernel Interfaces Manual			VMM(4)

NAME
       vmm.ko -- bhyve virtual machine monitor

SYNOPSIS
       To   load   the	 driver	 as  a	module	at  boot,  add	this  line  to
       loader.conf(5):

	     vmm_load="YES"

       The module can also be loaded manually with kldload(8):

	     kldload vmm

DESCRIPTION
       vmm.ko provides the kernel portion of the bhyve(4) hypervisor.

       An Intel	CPU with VT-x/EPT or AMD CPU with SVM support is required.

       PCI device passthrough to a virtual machine requires hardware with VT-d
       support.

PCI PASSTHROUGH
       When the	hardware supports VT-d,	and vmm.ko has	been  loaded  at  boot
       time,  PCI  devices can be reserved for use by the hypervisor.  Entries
       consisting of the  PCI  bus/slot/function  are  added  to  the  pptdevs
       loader.conf(5)  variable.   Additional entries are separated by spaces.
       Host PCI	devices	that match an entry will be assigned to	the hypervisor
       and will	not be probed by FreeBSD device	drivers.  See  the  "EXAMPLES"
       section below for sample	usage.

       Note  that  vmm	must be	given first the	right of refusal to all	pci(4)
       devices it may need to claim.  As a result, the vmm kernel  module  al-
       most  certainly	needs  to be loaded from loader.conf(5)	rather than by
       adding it to kld_list in	rc.conf(5).

       A large number of PCI device entries may	require	a string  longer  than
       the  128-character limit	of loader.conf(5) variables.  The pptdevs2 and
       pptdevs3	variables can be used for additional entries.

LOADER TUNABLES
       Tunables	can be set at the loader(8) prompt before booting  the	kernel
       or stored in loader.conf(5).

       hw.vmm.maxcpu
	       Maximum	number	of virtual CPUs.  The default is the number of
	       physical	CPUs in	the system.

EXAMPLES
       Reserve three PCI devices for use by the	 hypervisor:  bus  10  slot  0
       function	0, bus 6 slot 5	function 0, and	bus 6 slot 5 function 1.

	     pptdevs="10/0/0 6/5/0 6/5/1"

       It  is  possible	 to detach ppt from a PCI device without rebooting the
       host machine and	then attach a host driver, using the  devctl(8)	 util-
       ity.   Suppose  ppt is currently	attached to pci0:0:1:0 and we want the
       host's xhci(4) driver to	be attached instead:

	     # devctl set driver -f pci0:0:1:0 xhci

       The same	can be applied to attach ppt back:

	     # devctl set driver -f pci0:0:1:0 ppt

SEE ALSO
       bhyve(4), loader.conf(5), bhyve(8), bhyveload(8), devctl(8), kldload(8)

HISTORY
       vmm.ko first appeared in	FreeBSD	10.0.

AUTHORS
       Neel Natu <neel@freebsd.org>
       Peter Grehan <grehan@freebsd.org>

FreeBSD	13.2		      September	27, 2024			VMM(4)

NAME | SYNOPSIS | DESCRIPTION | PCI PASSTHROUGH | LOADER TUNABLES | EXAMPLES | SEE ALSO | HISTORY | AUTHORS

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=vmm&manpath=FreeBSD+14.2-RELEASE+and+Ports>

home | help