From owner-freebsd-current@FreeBSD.ORG Sat Jan 3 19:00:15 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B0A1C83; Sat, 3 Jan 2015 19:00:15 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0413738DB; Sat, 3 Jan 2015 19:00:15 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id em10so1081270wid.17; Sat, 03 Jan 2015 11:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0hFkgMmvn0WFm8brMO8N7kIBqFqvqWCdBE+yCN+YKGY=; b=UmBS11gOw2ZPCsZebCXzx916l5le4jwl+Vl4oCTixy9A4Z52aen5zq4X/37vbVorqL gNxEu3sbhG3C3HzR0KXo1hvWTyFI2ByEzDdXkSvysnkzQxQdZepvT++kDXRTsyfccdzz qg1bVqmaMU7c0ATaCkbo3kktsPS40IBIbDHyjFGcxs8vFg6MPY0IPdPXxMpYsMLSx4US 13pVNbAJ+VeW6ThlJKqgVR3jAPNQkba2JrfwsYRQczFj1jdB5KtXZJ7Aoas0b7XQHec2 uGKNMtqFjjJ0ozruBlxoHiWRgmBxlHpVvjdhbHolHcl3w4Of2supwCNqpTAAAB0HDIto gEvQ== MIME-Version: 1.0 X-Received: by 10.194.243.1 with SMTP id wu1mr76158043wjc.69.1420311613405; Sat, 03 Jan 2015 11:00:13 -0800 (PST) Received: by 10.27.5.207 with HTTP; Sat, 3 Jan 2015 11:00:13 -0800 (PST) In-Reply-To: <20150103161511.GA94237@onelab2.iet.unipi.it> References: <20150103161511.GA94237@onelab2.iet.unipi.it> Date: Sat, 3 Jan 2015 11:00:13 -0800 Message-ID: Subject: Re: any primer on running bhyve guests sharing disk with host ? From: Neel Natu To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD current , Neel Natu , Peter Grehan X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sat, 03 Jan 2015 19:00:15 -0000 Hi Luigi, On Sat, Jan 3, 2015 at 8:15 AM, Luigi Rizzo wrote: > Hi, > in order to do some kernel testing, I would like to run bhyve guests > using (through NFS, probably) the host's file system. > diskless(8) is probably one way to go, i was wondering if > someone has instructions for that. > Specifically: > - how to "bhyveload" a kernel (rather than the full disk image); > as an alternative, given a kernel, something to build an image > that can be passed to bhyveload > You can use the "-h" option to bhyveload(8) to do this. For e.g., "bhyveload -h / vmx" will load the kernel from "/boot/kernel/kernel" and use the loader configuration from "/boot". > - how to pass the necessary config (rootpath) to the client > without having to rely on a specialized dhcp server > You can set environment variables using the "-e" option: bhyveload -e "boot.nfsroot.server=1.2.3.4" -e "boot.nfsroot.path=/exports/guest1" There are a number of other environment variables set by the PXE loader - see sys/boot/i386/libi386/pxe.c. I haven't done this myself therefore not sure if this would work. best Neel > I used to be familiar with diskless configs, so i can probably sort > out the server side myself. > > cheers > luigi