Add UEFI section to the Virtualization chapter
PR: 215762 Submitted by: czarkoff@gmail.com Approved by: bcr (mentor)
This commit is contained in:
parent
ba22510846
commit
acd67b71a3
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50094
1 changed files with 79 additions and 4 deletions
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Know how to <link linkend="ports">install additional
|
<para>Know how to <link linkend="ports">install additional
|
||||||
third-party software</link>.</para>
|
third-party software</link>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -971,9 +971,9 @@ perm pass* 0660</programlisting>
|
||||||
<acronym>BSD</acronym>-licensed hypervisor became part of the
|
<acronym>BSD</acronym>-licensed hypervisor became part of the
|
||||||
base system with &os; 10.0-RELEASE. This hypervisor supports a
|
base system with &os; 10.0-RELEASE. This hypervisor supports a
|
||||||
number of guests, including &os;, OpenBSD, and many &linux;
|
number of guests, including &os;, OpenBSD, and many &linux;
|
||||||
distributions. Currently, <application>bhyve</application> only
|
distributions. By default, <application>bhyve</application>
|
||||||
supports a serial console and does not emulate a graphical
|
provides access to serial console and does not emulate a
|
||||||
console. Virtualization offload features of newer
|
graphical console. Virtualization offload features of newer
|
||||||
<acronym>CPU</acronym>s are used to avoid the legacy methods of
|
<acronym>CPU</acronym>s are used to avoid the legacy methods of
|
||||||
translating instructions and manually managing memory
|
translating instructions and manually managing memory
|
||||||
mappings.</para>
|
mappings.</para>
|
||||||
|
@ -1175,6 +1175,81 @@ grub> <userinput>boot</userinput></screen>
|
||||||
<screen>&prompt.root; <userinput>bhyvectl --destroy --vm=<replaceable>linuxguest</replaceable></userinput></screen>
|
<screen>&prompt.root; <userinput>bhyvectl --destroy --vm=<replaceable>linuxguest</replaceable></userinput></screen>
|
||||||
</sect2>
|
</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">
|
<sect2 xml:id="virtualization-bhyve-zfs">
|
||||||
<title>Using <acronym>ZFS</acronym> with
|
<title>Using <acronym>ZFS</acronym> with
|
||||||
<application>bhyve</application> Guests</title>
|
<application>bhyve</application> Guests</title>
|
||||||
|
|
Loading…
Reference in a new issue