mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 15:45:28 +00:00
6d0a617568
* Add nmdm type device to domain format documnetation * Add a section about nmdm console usage to the bhyve driver documentation
116 lines
3.6 KiB
XML
116 lines
3.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<body>
|
|
<h1>Bhyve driver</h1>
|
|
|
|
<ul id="toc"></ul>
|
|
|
|
<p>
|
|
Bhyve is a FreeBSD hypervisor. It first appeared in FreeBSD 10.0. However, it's
|
|
recommended to keep tracking FreeBSD 10-STABLE to make sure all new features
|
|
of bhyve are supported.
|
|
|
|
In order to enable bhyve on your FreeBSD host, you'll need to load the <code>vmm</code>
|
|
kernel module. Additionally, <code>if_tap</code> and <code>if_bridge</code> modules
|
|
should be loaded for networking support.
|
|
</p>
|
|
|
|
<p>
|
|
Additional information on bhyve could be obtained on <a href="http://bhyve.org/">bhyve.org</a>.
|
|
</p>
|
|
|
|
<h2><a name="uri">Connections to the Bhyve driver</a></h2>
|
|
<p>
|
|
The libvirt bhyve driver is a single-instance privileged driver. Some sample
|
|
connection URIs are:
|
|
</p>
|
|
|
|
<pre>
|
|
bhyve:///system (local access)
|
|
bhyve+unix:///system (local access)
|
|
bhyve+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
</pre>
|
|
|
|
<h2><a name="exconfig">Example guest domain XML configurations</a></h2>
|
|
|
|
<h3>Example config</h3>
|
|
<p>
|
|
The bhyve driver in libvirt is in its early stage and under active development. So it supports
|
|
only limited number of features bhyve provides. All the supported features could be found
|
|
in this sample domain XML.
|
|
</p>
|
|
|
|
<p>
|
|
A limitation that is not obvious from this sample domain XML is that currently only a
|
|
single network and a single disk device are supported for each domain (as PCI slot allocation code
|
|
in libvirt bhyve driver is yet to be implemented).
|
|
</p>
|
|
|
|
<pre>
|
|
<domain type='bhyve'>
|
|
<name>bhyve</name>
|
|
<uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
|
|
<memory>219136</memory>
|
|
<currentMemory>219136</currentMemory>
|
|
<vcpu>1</vcpu>
|
|
<os>
|
|
<type>hvm</type>
|
|
</os>
|
|
<features>
|
|
<apic/>
|
|
<acpi/>
|
|
</features>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<disk type='file'>
|
|
<driver name='file' type='raw'/>
|
|
<source file='/path/to/bhyve_freebsd.img'/>
|
|
<target dev='hda' bus='sata'/>
|
|
</disk>
|
|
<interface type='bridge'>
|
|
<model type='virtio'/>
|
|
<source bridge="virbr0"/>
|
|
</interface>
|
|
</devices>
|
|
</domain>
|
|
</pre>
|
|
|
|
|
|
<h2><a name="usage">Guest usage / management</a></h2>
|
|
|
|
<h3><a name="console">Connecting to a guest console</a></h3>
|
|
|
|
<p>
|
|
Guest console connection is supported through the <code>nmdm</code> device. It could be enabled by adding
|
|
the following to the domain XML (<span class="since">Since 1.2.4</span>):
|
|
</p>
|
|
|
|
<pre>
|
|
...
|
|
<devices>
|
|
<serial type="nmdm">
|
|
<source master="/dev/nmdm0A" slave="/dev/nmdm0B"/>
|
|
</serial>
|
|
</devices>
|
|
...</pre>
|
|
|
|
<p>
|
|
Then <code>virsh console</code> command can be used to connect to the text console
|
|
of a guest.</p>
|
|
|
|
<p><b>NB:</b> Some versions of bhyve have a bug that prevents guests from booting
|
|
until the console is opened by a client. This bug was fixed in FreeBSD
|
|
<a href="http://svnweb.freebsd.org/changeset/base/262884">r262884</a>. If
|
|
an older version is used, one either has to open a console manually with <code>virsh console</code>
|
|
to let a guest boot or start a guest using:</p>
|
|
|
|
<pre>start --console domname</pre>
|
|
|
|
|
|
</body>
|
|
</html>
|