Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 01:33:42 -0700
From:      Peter Grehan <grehan@freebsd.org>
To:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   bhyve graphics support
Message-ID:  <442c6d8f-2b64-c88b-382a-cf73eb6f7404@freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442c6d8f-2b64-c88b-382a-cf73eb6f7404>