From owner-svn-doc-head@freebsd.org Tue Jul 21 17:55:38 2015 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8556A9A7932; Tue, 21 Jul 2015 17:55:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 737371EC3; Tue, 21 Jul 2015 17:55:38 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6LHtcLn075347; Tue, 21 Jul 2015 17:55:38 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6LHtc7p075346; Tue, 21 Jul 2015 17:55:38 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201507211755.t6LHtc7p075346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 21 Jul 2015 17:55:38 +0000 (UTC) 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 X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 17:55:38 -0000 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 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 requires a computer with a newer processor that supports &intel; Extended Page Tables (EPT) or &amd; Rapid Virtualization Indexing (RVI), also known as - Nested Page Tables (NPT). Most newer - processors, specifically the &intel; &core; i3/i5/i7 and - &intel; &xeon; E3/E5/E7, support this feature. For a - complete list of &intel; processors that support - EPT, refer to http://ark.intel.com/search/advanced?s=t&ExtendedPageTables=true. - RVI is found on the 3rd generation and later - of the &amd.opteron; (Barcelona) processors. The easiest way to - check for support of EPT or - RVI is to look for the - POPCNT processor feature flag on the - Features2 line in dmesg or - /var/run/dmesg.boot. + Nested Page Tables (NPT). In addition, to + host &linux; guests, or &os; guests with more than one + vCPU, VMX unrestricted + mode support (UG) is also required. Most + newer processors, specifically the &intel;  &core; + i3/i5/i7 and &intel;  &xeon; E3/E5/E7, support these + features. UG support was introduced with + Intel's Westmere micro-architecture. For a complete list of + &intel; processors that support EPT, refer + to . + RVI is found on the third generation and + later of the &amd.opteron; (Barcelona) processors. The easiest + way to tell if a processor will support + bhyve is to run + dmesg or look in + /var/run/dmesg.boot for + the POPCNT processor feature flag on the + Features2 line and EPT and + UG on the VT-x line. Preparing the Host @@ -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: - &prompt.root; sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img -i -I FreeBSD-10.0-RELEASE-amd64-bootonly.iso guestname + &prompt.root; sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img -i -I FreeBSD-10.0-RELEASE-amd64-bootonly.iso guestname 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: - &prompt.root; sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img guestname + &prompt.root; sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img guestname @@ -1466,8 +1472,8 @@ grub> bootNow that the &linux; kernel is loaded, the guest can be started: - &prompt.root; 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 4 -m 1024M linuxguest + &prompt.root; bhyve -A -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 4 -m 1024M linuxguest The system will boot and start the installer. After installing a system in the virtual machine, reboot the virtual @@ -1494,8 +1500,8 @@ grub> bootBoot the virtual machine: - &prompt.root; 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 4 -m 1024M linuxguest + &prompt.root; bhyve -A -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 4 -m 1024M linuxguest &linux; will now boot in the virtual machine and eventually present you with the login prompt. Login and use @@ -1506,6 +1512,25 @@ grub> boot&prompt.root; bhyvectl --destroy --vm=linuxguest + + Using <acronym>ZFS</acronym> with + <application>bhyve</application> Guests + + If ZFS is available on the host + machine, using ZFS volumes + instead of disk image files can provide significant + performance benefits for the guest VMs. A + ZFS volume can be created by: + + &prompt.root; zfs create -V16G -o volmode=dev zroot/linuxdisk0 + + When starting the VM, specify the + ZFS volume as the disk drive: + + &prompt.root; bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 -s3:0,virtio-blk,/dev/zvol/zroot/linuxdisk0 \ + -l com1,stdio -c 4 -m 1024M linuxguest + + Virtual Machine Consoles @@ -1527,9 +1552,9 @@ grub> boot &prompt.root; kldload nmdm -&prompt.root; 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,/dev/nmdm0A -c 4 -m 1024M linuxguest -&prompt.root; cu -l /dev/nmdm0B -s 9600 +&prompt.root; bhyve -A -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,/dev/nmdm0A -c 4 -m 1024M linuxguest +&prompt.root; cu -l /dev/nmdm0B -s 9600 Connected Ubuntu 13.10 handbook ttyS0