Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2015 17:55:38 +0000 (UTC)
From:      Allan Jude <allanjude@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r47035 - head/en_US.ISO8859-1/books/handbook/virtualization
Message-ID:  <201507211755.t6LHtc7p075346@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: allanjude
Date: Tue Jul 21 17:55:37 2015
New Revision: 47035
URL: https://svnweb.freebsd.org/changeset/doc/47035

Log:
  Update bhyve chapter with note on CPU UG feature and zfs vol examples
  
  PR:		201578
  Submitted by:	Shawn Debnath <shawn@debnath.net>
  Approved by:	wblock (mentor)
  Differential Revision:	https://reviews.freebsd.org/D3105

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	Tue Jul 21 10:52:23 2015	(r47034)
+++ head/en_US.ISO8859-1/books/handbook/virtualization/chapter.xml	Tue Jul 21 17:55:37 2015	(r47035)
@@ -1320,19 +1320,25 @@ perm pass* 0660</programlisting>
       requires a computer with a newer processor that supports &intel;
       Extended Page Tables (<acronym>EPT</acronym>) or &amd; Rapid
       Virtualization Indexing (<acronym>RVI</acronym>), also known as
-      Nested Page Tables (<acronym>NPT</acronym>).  Most newer
-      processors, specifically the &intel;&nbsp;&core; i3/i5/i7 and
-      &intel;&nbsp;&xeon; E3/E5/E7, support this feature.  For a
-      complete list of &intel; processors that support
-      <acronym>EPT</acronym>, refer to <link
-      xlink:href="http://ark.intel.com/search/advanced?s=t&amp;ExtendedPageTables=true">http://ark.intel.com/search/advanced?s=t&amp;ExtendedPageTables=true</link>.
-      <acronym>RVI</acronym> is found on the 3rd  generation and later
-      of the &amd.opteron; (Barcelona) processors.  The easiest way to
-      check for support of <acronym>EPT</acronym> or
-      <acronym>RVI</acronym> is to look for the
-      <literal>POPCNT</literal> processor feature flag on the
-      <literal>Features2</literal> line in <command>dmesg</command> or
-      <filename>/var/run/dmesg.boot</filename>.</para>
+      Nested Page Tables (<acronym>NPT</acronym>).  In addition, to
+      host &linux; guests, or &os; guests with more than one
+      <acronym>vCPU</acronym>, <acronym>VMX</acronym> unrestricted
+      mode support (<acronym>UG</acronym>) is also required.  Most
+      newer processors, specifically the &intel;&nbsp; &core;
+      i3/i5/i7 and &intel;&nbsp; &xeon; E3/E5/E7, support these
+      features.  <acronym>UG</acronym> support was introduced with
+      Intel's Westmere micro-architecture.  For a complete list of
+      &intel; processors that support <acronym>EPT</acronym>, refer
+      to <link xlink:href="http://ark.intel.com/search/advanced?s=t&amp;ExtendedPageTables=true"/>.
+      <acronym>RVI</acronym> is found on the third generation and
+      later of the &amd.opteron; (Barcelona) processors.  The easiest
+      way to tell if a processor will support
+      <application>bhyve</application> is to run
+      <command>dmesg</command> or look in
+      <filename>/var/run/dmesg.boot</filename> for
+      the <literal>POPCNT</literal> processor feature flag on the
+      <literal>Features2</literal> line and <literal>EPT</literal> and
+      <literal>UG</literal> on the <literal>VT-x</literal> line.</para>
 
     <sect2 xml:id="virtualization-bhyve-prep">
       <title>Preparing the Host</title>
@@ -1391,7 +1397,7 @@ FreeBSD-10.0-RELEASE-amd64-bootonly.iso 
 	machine, used to track the running machines.  This example
 	starts the virtual machine in installation mode:</para>
 
-      <screen>&prompt.root; <userinput>sh /usr/share/examples/bhyve/vmrun.sh -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> -t tap0 -d <replaceable>guest.img</replaceable> -i -I <replaceable>FreeBSD-10.0-RELEASE-amd64-bootonly.iso</replaceable> <replaceable>guestname</replaceable></userinput></screen>
+      <screen>&prompt.root; <userinput>sh /usr/share/examples/bhyve/vmrun.sh -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> -t <replaceable>tap0</replaceable> -d <replaceable>guest.img</replaceable> -i -I <replaceable>FreeBSD-10.0-RELEASE-amd64-bootonly.iso</replaceable> <replaceable>guestname</replaceable></userinput></screen>
 
       <para>The virtual machine will boot and start the installer.
 	After installing a system in the virtual machine, when the
@@ -1415,7 +1421,7 @@ FreeBSD-10.0-RELEASE-amd64-bootonly.iso 
 	the boot loader menu in order to escape the loop.  Now the
 	guest can be started from the virtual disk:</para>
 
-      <screen>&prompt.root; <userinput>sh /usr/share/examples/bhyve/vmrun.sh -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> -t tap0 -d <replaceable>guest.img</replaceable> <replaceable>guestname</replaceable></userinput></screen>
+      <screen>&prompt.root; <userinput>sh /usr/share/examples/bhyve/vmrun.sh -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> -t <replaceable>tap0</replaceable> -d <replaceable>guest.img</replaceable> <replaceable>guestname</replaceable></userinput></screen>
     </sect2>
 
     <sect2 xml:id="virtualization-bhyve-linux">
@@ -1466,8 +1472,8 @@ grub> <userinput>boot</userinput></scree
       <para>Now that the &linux; kernel is loaded, the guest can be
 	started:</para>
 
-      <screen>&prompt.root; <userinput>bhyve -AI -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./linux.img \
--s 4:0,ahci-cd,./somelinux.iso -l com1,stdio -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput></screen>
+      <screen>&prompt.root; <userinput>bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,<replaceable>tap1</replaceable> -s 3:0,virtio-blk,<replaceable>./linux.img</replaceable> \
+    -s 4:0,ahci-cd,<replaceable>./somelinux.iso</replaceable> -l com1,stdio -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput></screen>
 
       <para>The system will boot and start the installer.  After
 	installing a system in the virtual machine, reboot the virtual
@@ -1494,8 +1500,8 @@ grub> <userinput>boot</userinput></scree
 
       <para>Boot the virtual machine:</para>
 
-      <screen>&prompt.root; <userinput>bhyve -AI -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 \
--s 3:0,virtio-blk,./linux.img -l com1,stdio -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput></screen>
+      <screen>&prompt.root; <userinput>bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,<replaceable>tap1</replaceable> \
+    -s 3:0,virtio-blk,<replaceable>./linux.img</replaceable> -l com1,stdio -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput></screen>
 
       <para>&linux; will now boot in the virtual machine and
 	eventually present you with the login prompt.  Login and use
@@ -1506,6 +1512,25 @@ grub> <userinput>boot</userinput></scree
       <screen>&prompt.root; <userinput>bhyvectl --destroy --vm=<replaceable>linuxguest</replaceable></userinput></screen>
     </sect2>
 
+    <sect2 xml:id="virtualization-bhyve-zfs">
+      <title>Using <acronym>ZFS</acronym> with
+        <application>bhyve</application> Guests</title>
+
+      <para>If <acronym>ZFS</acronym> is available on the host
+        machine, using <acronym>ZFS</acronym> volumes
+	instead of disk image files can provide significant
+	performance benefits for the guest <acronym>VMs</acronym>.  A
+	<acronym>ZFS</acronym> volume can be created by:</para>
+
+      <screen>&prompt.root; <userinput>zfs create -V<replaceable>16G</replaceable> -o volmode=dev <replaceable>zroot/linuxdisk0</replaceable></userinput></screen>
+
+      <para>When starting the <acronym>VM</acronym>, specify the
+        <acronym>ZFS</acronym> volume as the disk drive:</para>
+
+      <screen>&prompt.root; <userinput>bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,<replaceable>tap1</replaceable> -s3:0,virtio-blk,<replaceable>/dev/zvol/zroot/linuxdisk0</replaceable> \
+    -l com1,<replaceable>stdio</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput></screen>
+    </sect2>
+
     <sect2 xml:id="virtualization-bhyve-nmdm">
       <title>Virtual Machine Consoles</title>
 
@@ -1527,9 +1552,9 @@ grub> <userinput>boot</userinput></scree
 	information.</para>
 
       <screen>&prompt.root; <userinput>kldload nmdm</userinput>
-&prompt.root; <userinput>bhyve -AI -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./linux.img \
--l com1,<replaceable>/dev/nmdm0A</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput>
-&prompt.root; <userinput>cu -l /dev/nmdm0B -s 9600</userinput>
+&prompt.root; <userinput>bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,<replaceable>tap1</replaceable> -s 3:0,virtio-blk,<replaceable>./linux.img</replaceable> \
+    -l com1,<replaceable>/dev/nmdm0A</replaceable> -c <replaceable>4</replaceable> -m <replaceable>1024M</replaceable> <replaceable>linuxguest</replaceable></userinput>
+&prompt.root; <userinput>cu -l <replaceable>/dev/nmdm0B</replaceable> -s 9600</userinput>
 Connected
 
 Ubuntu 13.10 handbook ttyS0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507211755.t6LHtc7p075346>