From owner-freebsd-virtualization@FreeBSD.ORG Wed Jun 3 17:38:43 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A0D45D9; Wed, 3 Jun 2015 17:38:43 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yh0-x229.google.com (mail-yh0-x229.google.com [IPv6:2607:f8b0:4002:c01::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9AAD15CF; Wed, 3 Jun 2015 17:38:42 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by yhda23 with SMTP id a23so3813693yhd.2; Wed, 03 Jun 2015 10:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Wy/B5IFlWwenP5zPm7VRSAHV1JGvbih1hKtPVxaulkA=; b=EHipf5MptbSskym/x3TQenyJfAu9QFJqVMOAvSvY9oz0+Ocu8PWVdxYKkA1VcMNLM5 gwneVPXV1zgaClgQnNPFt5HezSexYGKrBbMEtxJGL9wS2hUleKWxJtUGapjoP6lRoEYO h/RxsPX5Ug2LzX2tGgvjsFj7o0qDFZ97mE+u+u9dV21UZC5F5QnQxaZ/KCzPqUsfkEhp Nm3grFwEL3TeMO5tZEUFft7631BEkfsiCGUhNKuLxNjChGXGcoPYv8dEkoIzmB1e2m9g 5VcncI1kmav8A2S05BGh6YsKUzvcm0vFj37euGQaUwmY4i1h++POnqgXLtjv21bWgXVR DqnA== MIME-Version: 1.0 X-Received: by 10.170.125.208 with SMTP id r199mr14319475ykb.15.1433353121823; Wed, 03 Jun 2015 10:38:41 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.13.233.70 with HTTP; Wed, 3 Jun 2015 10:38:41 -0700 (PDT) In-Reply-To: <556F28C4.8050100@FreeBSD.org> References: <556D9163.1080704@FreeBSD.org> <20150602164949.GZ50817@funkthat.com> <556DF2AB.8070507@FreeBSD.org> <20150602230415.GC50817@funkthat.com> <556EA85F.1010907@FreeBSD.org> <20150603155305.GG50817@funkthat.com> <556F28C4.8050100@FreeBSD.org> Date: Wed, 3 Jun 2015 10:38:41 -0700 X-Google-Sender-Auth: ir3GjImXNYQbFmX7skdF6JYMkHo Message-ID: Subject: Re: bhyve: bhyveload, bhyve, bhyvectl --destroy From: Craig Rodrigues To: Andriy Gapon Cc: John-Mark Gurney , "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 17:38:43 -0000 On Wed, Jun 3, 2015 at 9:18 AM, Andriy Gapon wrote: > On 03/06/2015 18:53, John-Mark Gurney wrote: > > JIMO, bhyveload(8) could be just merged into bhyve(8) and the latter should > behave like vmrun.sh does. bhyve(8) should retain an option to run a > preloaded > kernel, so that things like bhyve-grub keep working. > I understand why bhyveload(8) and bhyve(8) exists. However, from a usability perspective, the fact that I need to invoke two commands to start a VM is unfortunate. >From a end-user usability standpoint, this is no good. vmrun.sh is not bad for simple usage, but its limitations become apparent quite quickly. For anyone doing serious stuff with bhyve, you end up having to write your own replacement for vmrun.sh. I've done it, and I am sure others have as well. What I would like to see is a single command that I can type with all the command-line options to start a bhyve VM, instead of multiple commands that need to be stitched together via a script. For example, if bhyve(8) could be enhanced with a flag "--loader" (or choose another flag name that you prefer): (1) If "--loader" is not specified, then by default, bhyve uses bhyveload (2) If "--loader" is specified, then valid options are bhyveload and grub-bhyve (3) bhyve(8) will internally fork the loader specified in (1) or (2) (4) If (3) fails, then stop. If (3) succeeds, then bhyve(8) will continue to start the VM I would also like to see: -> command-line option parsing for bhyveload and grub-bhyve changed, so that they silently ignore command-line options that they don't grok. That would make it easier to implement (3), since bhyve(8) could pass its full command-line arguments to the forked loader. I don't have time to work on this, but it would be nice if this could be implemented. -- Craig