Re: Install FreeBSD from source into VM image

From: John Baldwin <jhb_at_freebsd.org>
Date: Wed, 16 Aug 2017 15:40:33 -0700
On Wednesday, August 16, 2017 12:57:25 PM Panagiotes Mousikides wrote:
> Den 2017-08-14 kl. 18:49, skrev Matt Joras:
> > On 08/14/2017 11:42, Panagiotes Mousikides wrote:
> >> I am working on the FreeBSD test suite, and need to create an image
> >> file from source.  How can I do that?
> >>
> >> I need to run something similar to make installkernel && make
> >> installworld with an image file as the target, such that the end
> >> result is a ready-made FreeBSD system that can be started up with
> >> bhyve.  How can I do that, including creating the correct /etc files,
> >> and the correct boot code and partitioning?
> >>   
> > See release(7), https://www.freebsd.org/cgi/man.cgi?release(7). The
> > relevant section is under virtual machine disk images and the vm-image
> > target. The VMFORMATS for bhyve is "raw". That will generate an image
> > that "just works" with vmrun.sh
> >
> > Matt Joras
> >
> Hi Matt!
> 
> Thank you so much for the tip!  I tried what you recommended, the 
> command I ran specifically was (inside release/)
> 
>      sudo make vm-image WITH_VMIMAGES=1 VMBASE=aaaa VMSIZE=2G 
> VMFORMATS=raw VMSIZE=2G vm-image
> 
> followed by
> 
>      sudo sh /usr/share/examples/bhyve/vmrun.sh -d aaaa.raw vm-aaaa
> 
> but apparently the image generated doesn't work.  The error I'm getting 
> after hitting "1" at the boot screen is
> 
>      Error return from kevent monitor: Not permitted in capability mode
> 
> repeatedly cascading through the screen.  Any ideas?  I would greatly 
> appreciate your help!

This sounds like an issue with the bhyve capsicum work.  I've cc'd Allan
and Peter who might be able to help track that down.  It might be useful
if you can run bhyve under ktrace, e.g.:

  sudo ktrace -i -t p sh /usr/share/examples/bhyve/vmrun.sh -d aaaa.raw vm-aaaa

And then post the output of 'sudo kdump'

-- 
John Baldwin
Received on Wed Aug 16 2017 - 20:41:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC