Re: bhyve graphics support

2016-06-29 Thread Fabian Freyer
Hi everybody,

I've added some code to support VNC Authentication (as much as a 16-byte
DES challenge response could be seen as Authentication) as per
https://tools.ietf.org/html/rfc6143#page-10.

It's my first time working with this reviews thing - I'm a bit unsure
how to set the diff to be based off the projects/ instead of head/, so
if I still need to change something, I would.

https://reviews.freebsd.org/D7029

It's been tested to work with TightVNC Viewer version 1.3.9. Not sure
about other ones - the RFC is a bit unclear here and there.

Fabian Freyer
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-06-05 Thread Peter Grehan

Hi Yamagi,


  XHCI isn't in Windows7 so you can just remove that config line,
pushing mouse input through the PS2 mouse.


That was a little bit strange, it seemed like the emulated ps/2 devices
just wouldn't work on a Win 7 VM. The "atkbd data buffer full" may be
an indication for not delivered interrupts or something like that.
After I've rebooted the host things suddenly started to work. Maybe
some kind of system inconsistency. It was some 11-CURRENT with about 4
weeks uptime.


 Was the VM destroyed between invocations ? If not, then it's probably 
a bug in bhyve with not resetting h/w state correctly.



It may be a good idea to add a note to the Windows installation guide
at https://people.freebsd.org/~grehan/bhyve_uefi/windows_install.txt
that Window 7 requieres AHCI disks with a blocksize if 512 bytes.
Otherwise the installation will fail with "Windows Setup could not
configure Windows on this computer?s hardware" and Windows Update will
bail out with error 0xc8000247.


 Done, and will also update the wiki with the error.

later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-06-04 Thread James Lodge
>Hello,

> > As far as I know UEFI supports ahci-* boot devices only. For the basic
> > UEFI support without GOP the AHCI devices needed to be mapped on slot 3
> > and 4. I don't know if that's still the case.
>
>   Depends on the o/s being booted - if it needs legacy interrupt
> support, the only available slots with routing set up are 3/4/5/6.
>
>   UEFI operates in polled-mode so it has no constraints on it's own.

Ah okay. That's good to know. At least for the Windows 2016 case.

> > I've got working VNC access to a FreeBSD 10.3 VM. My Windows 7 install
> > disc starts up, but the mouse is not working. Keystrokes through VNC
> > give "atkbd data buffer full" errors. I'll open a new thread for that
> > if I can't figure it out.
>
>   XHCI isn't in Windows7 so you can just remove that config line,
> pushing mouse input through the PS2 mouse.

That was a little bit strange, it seemed like the emulated ps/2 devices
just wouldn't work on a Win 7 VM. The "atkbd data buffer full" may be
an indication for not delivered interrupts or something like that.
After I've rebooted the host things suddenly started to work. Maybe
some kind of system inconsistency. It was some 11-CURRENT with about 4
weeks uptime.

It may be a good idea to add a note to the Windows installation guide
at https://people.freebsd.org/~grehan/bhyve_uefi/windows_install.txt
that Window 7 requieres AHCI disks with a blocksize if 512 bytes.
Otherwise the installation will fail with "Windows Setup could not
configure Windows on this computer?s hardware" and Windows Update will
bail out with error 0xc8000247.

Regards,
Yamagi


--
Homepage:  www.yamagi.org
XMPP:  yam...@yamagi.org
GnuPG/GPG: 0xEFBCCBCB
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Hi Peter,

I've been looking forward to this feature and having a graphical console in 
Windows for something, thank you for your effort. I'm currently using Bhyve on 
Freenas 9.10 ( FreeBSD 10.3). I've built from source in FreeBSD 11 r301289 and 
copied the Bhyve binary over. There were a few other hoops to jump through, but 
I can now launch Bhyve with the GOP UEFI binary.

If I  execute Bhyve without the fbuf device, Bhyve runs and Windows boots 
normally. If I include the fbuf,  Bhyve returns without error, but does not 
run. If I include the XHCI tablet backend, again Bhyve executes and Windows 
boots as normal.

Am I missing something that is required by fbuf outside of the Bhyve binary?

Regards
James Lodge


___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-30 Thread Yamagi Burmeister
Hello,

> > As far as I know UEFI supports ahci-* boot devices only. For the basic
> > UEFI support without GOP the AHCI devices needed to be mapped on slot 3
> > and 4. I don't know if that's still the case.
> 
>   Depends on the o/s being booted - if it needs legacy interrupt 
> support, the only available slots with routing set up are 3/4/5/6.
> 
>   UEFI operates in polled-mode so it has no constraints on it's own.

Ah okay. That's good to know. At least for the Windows 2016 case.

> > I've got working VNC access to a FreeBSD 10.3 VM. My Windows 7 install
> > disc starts up, but the mouse is not working. Keystrokes through VNC
> > give "atkbd data buffer full" errors. I'll open a new thread for that
> > if I can't figure it out.
> 
>   XHCI isn't in Windows7 so you can just remove that config line, 
> pushing mouse input through the PS2 mouse.

That was a little bit strange, it seemed like the emulated ps/2 devices
just wouldn't work on a Win 7 VM. The "atkbd data buffer full" may be
an indication for not delivered interrupts or something like that.
After I've rebooted the host things suddenly started to work. Maybe
some kind of system inconsistency. It was some 11-CURRENT with about 4
weeks uptime.

It may be a good idea to add a note to the Windows installation guide
at https://people.freebsd.org/~grehan/bhyve_uefi/windows_install.txt
that Window 7 requieres AHCI disks with a blocksize if 512 bytes.
Otherwise the installation will fail with "Windows Setup could not
configure Windows on this computer?s hardware" and Windows Update will
bail out with error 0xc8000247.

Regards,
Yamagi


-- 
Homepage:  www.yamagi.org
XMPP:  yam...@yamagi.org
GnuPG/GPG: 0xEFBCCBCB
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Shawn Webb
On Fri, May 27, 2016 at 10:48:54AM -0700, Michael Dexter wrote:
> On 5/27/16 1:33 AM, Peter Grehan wrote:
> > As of r300829, support for graphic output has been checked into the
> > projects/bhyve_graphics branch...
> 
> HUGE thanks to Leon and Peter for making this happen. We all owe them 
> our gratitude as with all things bhyve, this is non-trivial code.
> 
> There is a dedicated UEFI page on the wiki that would be suitable for 
> the FAQ's that are starting to appear on this thread. I will sync it 
> with Peter's original message and welcome others to contribute:
> 
> https://wiki.freebsd.org/bhyve/UEFI
> 
> I tested every major GNU/Linux distribution and a few variants and 
> Windows up through 2016 TP5. The results have been great but I'm sure 
> there are edge cases that need addressing. Please do test this with high 
> CPU counts, RAM allocations and anything else you can think of.

I'd like to echo Michael Dexter's appreciation. Peter, Michael, and
everyone else who worked on this: thank you so much.

I've imported the new bhyve code into a feature branch of HardenedBSD.
I'm glad to report that it's working flawlessly, even when compiled with
PIE + RELRO + BIND_NOW.

Here's a little screenshot showing CentOS getting installed:
https://photos.google.com/share/AF1QipPKqcVSwcPYxqEmfjXFJaMojL09ltTqmMsj-KXwdVftUL1BQQIfAApJrp8js4OMuQ?key=bG9YOE5ubS0yOEFrdmlqZ0x4eGw4OUFLTDZlUkln

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: bhyve graphics support

2016-05-27 Thread Michael Dexter

On 5/27/16 1:33 AM, Peter Grehan wrote:

As of r300829, support for graphic output has been checked into the
projects/bhyve_graphics branch...


HUGE thanks to Leon and Peter for making this happen. We all owe them 
our gratitude as with all things bhyve, this is non-trivial code.


There is a dedicated UEFI page on the wiki that would be suitable for 
the FAQ's that are starting to appear on this thread. I will sync it 
with Peter's original message and welcome others to contribute:


https://wiki.freebsd.org/bhyve/UEFI

I tested every major GNU/Linux distribution and a few variants and 
Windows up through 2016 TP5. The results have been great but I'm sure 
there are edge cases that need addressing. Please do test this with high 
CPU counts, RAM allocations and anything else you can think of.


All the best,

Michael Dexter
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Roman Bogorodskiy
  Peter Grehan wrote:

> Hi Roman,
> 
> > I've just tried to do a Fedora installation and it worked like a charm.
> >
> > A couple of questions:
> >
> >  * There was a limitation that AHCI devices must use slots 3-6. [1]
> >Is it still there? If yes, any plans to get rid of it?
> 
>   It's not a limitation for guests that can use MSI for AHCI. Older 
> versions of Windows use legacy interrupts, but I noticed that 2k16 (and 
> maybe recent builds of 10) are using now using MSI.
> 
>   The real fix is to have more flexible ACPI DSDT generation from inside 
> of UEFI, but that's a non-trivial project.
> 
> >  * It *seems* that now it's OK to cycle a VM this way:
> >
> >host# bhyve ...
> >guest# reboot # guest goes away
> >host# bhyve ... # run it again
> >
> >Previously (with bhyveload) it didn't work (for me at least) without
> >doing "bhyvectl --destroy". Is it safe now not to call "bhyvectl
> >--destroy" before the second run now?
> 
>   Yes, except for the case when you modify the amount of memory given to 
> the guest - then you will need to delete prior to the run with the new 
> config.

Got it, thanks!

Roman Bogorodskiy


signature.asc
Description: PGP signature


Re: bhyve graphics support

2016-05-27 Thread Peter Grehan

Hi Roman,


I've just tried to do a Fedora installation and it worked like a charm.

A couple of questions:

 * There was a limitation that AHCI devices must use slots 3-6. [1]
   Is it still there? If yes, any plans to get rid of it?


 It's not a limitation for guests that can use MSI for AHCI. Older 
versions of Windows use legacy interrupts, but I noticed that 2k16 (and 
maybe recent builds of 10) are using now using MSI.


 The real fix is to have more flexible ACPI DSDT generation from inside 
of UEFI, but that's a non-trivial project.



 * It *seems* that now it's OK to cycle a VM this way:

   host# bhyve ...
   guest# reboot # guest goes away
   host# bhyve ... # run it again

   Previously (with bhyveload) it didn't work (for me at least) without
   doing "bhyvectl --destroy". Is it safe now not to call "bhyvectl
   --destroy" before the second run now?


 Yes, except for the case when you modify the amount of memory given to 
the guest - then you will need to delete prior to the run with the new 
config.


later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Peter Grehan

Hi Lars,


-s 3:0,virtio-blk,./ubuntu-hd.img \

 ...

Then I connect with vncviewer but only see this message:

"Boot failed. EFI misc device"


 Which Ubuntu version/image is this ?

later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Yamagi Burmeister
> > > grub-bhyve -m device.map -r hd0,msdos1 -M 4G ubuntu
> > > ~lars/dev/bhyve_graphics/bhyve \
> > > -s 0:0,hostbridge \
> > > -s 1:0,lpc \
> > > -s 2:0,virtio-net,tap1 \
> > > -s 3:0,virtio-blk,./ubuntu-hd.img \
> > > -s 11,fbuf,tcp=0.0.0.0:5900,w=1280,h=720,wait \
> > > -s 20,xhci,tablet \
> > > -l bootrom,/home/lars/dev/bhyve_graphics/BHYVE_UEFI_20160526.fd \
> > > -c 4 \
> > > -m 4G \
> > > ubuntu

As far as I know UEFI supports ahci-* boot devices only. For the basic
UEFI support without GOP the AHCI devices needed to be mapped on slot 3
and 4. I don't know if that's still the case.

I've got working VNC access to a FreeBSD 10.3 VM. My Windows 7 install
disc starts up, but the mouse is not working. Keystrokes through VNC 
give "atkbd data buffer full" errors. I'll open a new thread for that
if I can't figure it out.

Regards,
Yamagi

-- 
Homepage:  www.yamagi.org
XMPP:  yam...@yamagi.org
GnuPG/GPG: 0xEFBCCBCB
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Lars Engels
On Fri, May 27, 2016 at 09:11:16PM +1000, Jason Tubnor wrote:
> On 27 May 2016 8:44 PM, "Lars Engels"  wrote:
> >
> >
> > downloading the UEFI image I start Ubuntu like this:
> >
> > grub-bhyve -m device.map -r hd0,msdos1 -M 4G ubuntu
> > ~lars/dev/bhyve_graphics/bhyve \
> > -s 0:0,hostbridge \
> > -s 1:0,lpc \
> > -s 2:0,virtio-net,tap1 \
> > -s 3:0,virtio-blk,./ubuntu-hd.img \
> > -s 11,fbuf,tcp=0.0.0.0:5900,w=1280,h=720,wait \
> > -s 20,xhci,tablet \
> > -l bootrom,/home/lars/dev/bhyve_graphics/BHYVE_UEFI_20160526.fd \
> > -c 4 \
> > -m 4G \
> > ubuntu
> >
> >
> > Then I connect with vncviewer but only see this message:
> >
> > "Boot failed. EFI misc device"
> 
> I don't think you need the grub shim with uefi.

That might be, but removing the grug-bhyve call doesn't change the error
message.


pgpe4RiZj1Vhh.pgp
Description: PGP signature


Re: bhyve graphics support

2016-05-27 Thread Jason Tubnor
On 27 May 2016 8:44 PM, "Lars Engels"  wrote:
>
>
> downloading the UEFI image I start Ubuntu like this:
>
> grub-bhyve -m device.map -r hd0,msdos1 -M 4G ubuntu
> ~lars/dev/bhyve_graphics/bhyve \
> -s 0:0,hostbridge \
> -s 1:0,lpc \
> -s 2:0,virtio-net,tap1 \
> -s 3:0,virtio-blk,./ubuntu-hd.img \
> -s 11,fbuf,tcp=0.0.0.0:5900,w=1280,h=720,wait \
> -s 20,xhci,tablet \
> -l bootrom,/home/lars/dev/bhyve_graphics/BHYVE_UEFI_20160526.fd \
> -c 4 \
> -m 4G \
> ubuntu
>
>
> Then I connect with vncviewer but only see this message:
>
> "Boot failed. EFI misc device"

I don't think you need the grub shim with uefi.

Cheers,

Jason
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve graphics support

2016-05-27 Thread Lars Engels
On Fri, May 27, 2016 at 01:33:42AM -0700, Peter Grehan wrote:
> 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

Thanks for your work on this!

With Ubuntu 16.04 I was not successful so far. After compiling bhyve and
downloading the UEFI image I start Ubuntu like this:

grub-bhyve -m device.map -r hd0,msdos1 -M 4G ubuntu
~lars/dev/bhyve_graphics/bhyve \
-s 0:0,hostbridge \
-s 1:0,lpc \
-s 2:0,virtio-net,tap1 \
-s 3:0,virtio-blk,./ubuntu-hd.img \
-s 11,fbuf,tcp=0.0.0.0:5900,w=1280,h=720,wait \
-s 20,xhci,tablet \
-l bootrom,/home/lars/dev/bhyve_graphics/BHYVE_UEFI_20160526.fd \
-c 4 \
-m 4G \
ubuntu


Then I connect with vncviewer but only see this message:

"Boot failed. EFI misc device"

Is there anything I can try?


pgpZDByStLQd2.pgp
Description: PGP signature


Re: bhyve graphics support

2016-05-27 Thread K. Macy
Yes.

-M

On Friday, May 27, 2016, Peter Grehan  wrote:

> Cool stuff. FYI new i915 driver has vgpu support, incliuding 3D.
>>
>
>  Is that the KVM-GT work ? (https://github.com/01org/KVMGT-kernel)
>
>  If so, yes, it would be great to support that in bhyve.
>
> later,
>
> Peter.
>
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


bhyve graphics support

2016-05-27 Thread Peter Grehan
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.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"