From owner-freebsd-current@freebsd.org Wed Aug 16 22:41:52 2017 Return-Path: Delivered-To: freebsd-current@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 6F572DD7087; Wed, 16 Aug 2017 22:41:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4622472D35; Wed, 16 Aug 2017 22:41:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0394510AF07; Wed, 16 Aug 2017 18:41:49 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Cc: Panagiotes Mousikides , Matt Joras , "freebsd-hackers@freebsd.org" , allanjude@freebsd.org, "Peter Grehan (grehan@freebsd.org)" Subject: Re: Install FreeBSD from source into VM image Date: Wed, 16 Aug 2017 15:40:33 -0700 Message-ID: <25569442.iT463nDDSg@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <9152fc29-125d-1c01-ecfa-740a1cfcaadd@yandex.com> References: <8888acfa-4dc8-a68f-8ca8-c4df84e5e74a@yandex.com> <97d0475c-9603-03d8-144d-dc803e5530c7@FreeBSD.org> <9152fc29-125d-1c01-ecfa-740a1cfcaadd@yandex.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 16 Aug 2017 18:41:49 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2017 22:41:52 -0000 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