svn commit: r50094 - head/en_US.ISO8859-1/books/handbook/virtualization
Michael Dexter
dexter at FreeBSD.org
Tue Mar 28 00:09:28 UTC 2017
Author: dexter
Date: Tue Mar 28 00:09:27 2017
New Revision: 50094
URL: https://svnweb.freebsd.org/changeset/doc/50094
Log:
Add UEFI section to the Virtualization chapter
PR: 215762
Submitted by: czarkoff at gmail.com
Approved by: bcr (mentor)
Modified:
head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
Modified: head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml Mon Mar 27 23:24:14 2017 (r50093)
+++ head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml Tue Mar 28 00:09:27 2017 (r50094)
@@ -91,7 +91,7 @@
<listitem>
<para>Know how to <link linkend="ports">install additional
- third-party software</link>.</para>
+ third-party software</link>.</para>
</listitem>
</itemizedlist>
</sect1>
@@ -971,9 +971,9 @@ perm pass* 0660</programlisting>
<acronym>BSD</acronym>-licensed hypervisor became part of the
base system with &os; 10.0-RELEASE. This hypervisor supports a
number of guests, including &os;, OpenBSD, and many &linux;
- distributions. Currently, <application>bhyve</application> only
- supports a serial console and does not emulate a graphical
- console. Virtualization offload features of newer
+ distributions. By default, <application>bhyve</application>
+ provides access to serial console and does not emulate a
+ graphical console. Virtualization offload features of newer
<acronym>CPU</acronym>s are used to avoid the legacy methods of
translating instructions and manually managing memory
mappings.</para>
@@ -1175,6 +1175,81 @@ grub> <userinput>boot</userinput></scree
<screen>&prompt.root; <userinput>bhyvectl --destroy --vm=<replaceable>linuxguest</replaceable></userinput></screen>
</sect2>
+ <sect2 xml:id="virtualization-bhyve-uefi">
+ <title>Booting <application>bhyve</application> Virtual Machines
+ with <acronym>UEFI</acronym> Firmware</title>
+
+ <para>In addition to <application>bhyveload</application> and
+ <application>grub-bhyve</application>, the
+ <application>bhyve</application> hypervisor can also boot
+ virtual machines using the <acronym>UEFI</acronym> userspace
+ firmware. This option may support guest operating systems
+ that are not supported by the other loaders.</para>
+
+ <para>In order to make use of the <acronym>UEFI</acronym>
+ support in <application>bhyve</application>, first obtain the
+ <acronym>UEFI</acronym> firmware images. This can be done
+ by installing <package>sysutils/bhyve-firmware</package>
+ port or package.</para>
+
+ <para>With the firmware in place, add the flags
+ <option>-l bootrom,<replaceable>/path/to/firmware</replaceable></option>
+ to your <application>bhyve</application> command line.
+ The actual <application>bhyve</application> command may look
+ like this:</para>
+
+ <screen>&prompt.root; <userinput>bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \
+-s 2:0,virtio-net,<replaceable>tap1</replaceable> -s 3:0,virtio-blk,<replaceable>./disk.img</replaceable> \
+-s 4:0,ahci-cd,<replaceable>./install.iso</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> \
+-l bootrom,<replaceable>/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</replaceable> \
+<replaceable>guest</replaceable></userinput></screen>
+
+ <para><package>sysutils/bhyve-firmware</package> also contains a
+ <acronym>CSM</acronym>-enabled firmware, to boot guests with no
+ <acronym>UEFI</acronym> support in legacy
+ <acronym>BIOS</acronym> mode:</para>
+
+ <screen>&prompt.root; <userinput>bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \
+-s 2:0,virtio-net,<replaceable>tap1</replaceable> -s 3:0,virtio-blk,<replaceable>./disk.img</replaceable> \
+-s 4:0,ahci-cd,<replaceable>./install.iso</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> \
+-l bootrom,<replaceable>/usr/local/share/uefi-firmware/BHYVE_UEFI_CSM.fd</replaceable> \
+<replaceable>guest</replaceable></userinput></screen>
+ </sect2>
+
+ <sect2 xml:id="virtualization-bhyve-framebuffer">
+ <title>Graphical <acronym>UEFI</acronym> Framebuffer for
+ <application>bhyve</application> Guests</title>
+
+ <para>The <acronym>UEFI</acronym> firmware support is particularly
+ useful with predominantly graphical guest operating systems
+ such as Microsoft &windows;.</para>
+
+ <para>Support for the UEFI-GOP framebuffer may also be enabled
+ with the <option>-s 29,fbuf,tcp=<replaceable>0.0.0.0:5900</replaceable></option>
+ flags. The framebuffer resolution may be configured with
+ <option>w=<replaceable>800</replaceable></option> and
+ <option>h=<replaceable>600</replaceable></option>, and
+ <application>bhyve</application> can be instructed to wait for
+ a <acronym>VNC</acronym> connection before booting the guest
+ by adding <option>wait</option>. The framebuffer may be
+ accessed from the host or over the network via the
+ <acronym>VNC</acronym> protocol.</para>
+
+ <para>The resulting <application>bhyve</application> command
+ would look like this:</para>
+
+ <screen>&prompt.root; <userinput>bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc \
+-s 2:0,virtio-net,<replaceable>tap1</replaceable> -s 3:0,virtio-blk,<replaceable>./disk.img</replaceable> \
+-s 4:0,ahci-cd,<replaceable>./install.iso</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> \
+-s 29,fbuf,tcp=<replaceable>0.0.0.0:5900</replaceable>,w=<replaceable>800</replaceable>,h=<replaceable>600</replaceable>,wait \
+-l bootrom,<replaceable>/usr/local/share/uefi-firmware/BHYVE_UEFI.fd</replaceable> \
+<replaceable>guest</replaceable></userinput></screen>
+
+ <para>Note, in BIOS emulation mode, the framebuffer will cease
+ receiving updates once control is passed from firmware to
+ guest operating system.</para>
+ </sect2>
+
<sect2 xml:id="virtualization-bhyve-zfs">
<title>Using <acronym>ZFS</acronym> with
<application>bhyve</application> Guests</title>
More information about the svn-doc-head
mailing list