From owner-freebsd-virtualization@freebsd.org Fri May 27 08:33:50 2016 Return-Path: Delivered-To: freebsd-virtualization@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 C6800B49556 for ; Fri, 27 May 2016 08:33:50 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA0D1DBE for ; Fri, 27 May 2016 08:33:49 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id A071420B4A16 for ; Fri, 27 May 2016 18:33:44 +1000 (AEST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 9B7F4280F62 for ; Fri, 27 May 2016 18:33:44 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ed4YXOr5rOgO for ; Fri, 27 May 2016 18:33:44 +1000 (AEST) Received: from Peters-MacBook-Pro-2.local (c-67-180-92-13.hsd1.ca.comcast.net [67.180.92.13]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 26FD02809F7 for ; Fri, 27 May 2016 18:33:42 +1000 (AEST) From: Peter Grehan Subject: bhyve graphics support To: "freebsd-virtualization@freebsd.org" Message-ID: <442c6d8f-2b64-c88b-382a-cf73eb6f7404@freebsd.org> Date: Fri, 27 May 2016 01:33:42 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=LvDQ8TVc c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=5eVCmCvhg37cu/pjidAGzw==:17 a=IkcTkHD0fZMA:10 a=yrkiwgmsf1kA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=DaYa-wuehj-2TE99uUMA:9 a=IjZwj45LgO3ly-622nXo:22 a=Bn2pgwyD2vrAyMmN8A2t:22 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2016 08:33:50 -0000 As of r300829, support for graphic output has been checked into the projects/bhyve_graphics branch. This is just the usr.sbin/bhyve executable, so is quick and easy to build from source. Assuming a reasonably current source tree is in /usr/src, svn co http://svn.freebsd.org/base/projects/bhyve_graphics path/to/dir cd path/to/dir make BHYVE_SYSDIR=/usr/src -m /usr/src/share/mk UEFI GOP support has been checked into the freebsd/edk2 repo: https://github.com/freebsd/uefi-edk2/commit/a36132939e259df79b16699c03c6f1d63c7454b9 A pre-built bhyve/UEFI binary image with GOP support is available at: https://people.freebsd.org/~grehan/bhyve_uefi/BHYVE_UEFI_20160526.fd The new bhyve executable supports some new devices. An example of using them for Windows10 is: bhyve \ -c 2 \ -s 3,ahci-cd,/images/win10_install.iso \ -s 4,ahci-hd,/images/win10.img \ -s 11,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait \ -s 20,xhci,tablet \ -s 31,lpc \ -l bootrom,/images/BHYVE_UEFI_20160526.fd \ -m 2G -H -w \ windows The framebuffer device, "fbuf", takes parameters describing the VNC server options. The optional "wait" parameter will hold execution of the guest until a VNC client is connected. The height and width of the frame buffer can be specified, with the constraints that the maximum is 1920x1200. Arbitrary resolutions are not yet supported by UEFI. That will be fixed, but in the meantime, available resolutions are: 1920 x 1200 1920 x 1080 1600 x 1200 1600 x 900 1280 x 1024 1280 x 720 1024 x 768 800 x 600 640 x 480 Specifying an unsupported resolution will result in UEFI falling back to 800x600. The XHCI emulation currently only has a tablet back end. This connects to pointer input from VNC. If not present, pointer input defaults to the ps2 mouse emulation. Note the latter only suppports relative coordinates which don't track the cursor very well in VNC. Keyboard input currently defaults to the PS2 keyboard. The code has been tested with Windows 7/8/8.1/10 and Server 2k12/2k16, Ubuntu 15.10, and FreeBSD 10.3/11-CURRENT. Note that older versions of Windows, and FreeBSD, don't like the XHCI tablet - the default ps2 mouse should be used with those. For VNC clients, TightVNC, TigherVNC, and RealVNC (aka VNC Viewer) have been tested on various hosts. The OSX VNC client is known not to work. Give it a try and let us know how it goes ! Many thanks to Michael Dexter for helping out with the testing of this. later, Peter.