From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 18:51:19 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0DA3C6E; Wed, 20 Aug 2014 18:51:19 +0000 (UTC) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) (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 C0C9B3906; Wed, 20 Aug 2014 18:51:18 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id b8so7663947lan.19 for ; Wed, 20 Aug 2014 11:51:16 -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=RNeoimFyWpErDsyz8234ZP3cYuO/FPTuC4SHoxON4GE=; b=Q9ybvduJl9SrDPkC/oiwsiJHDpH4ma2f3vbmOXLarq0rN09oVFs1jucEsdLcMswbqL 8w3TyrLjJvjE6yKYRrob0JqcbrCDDEq9g1vh83bSuPUGUUs+Cmduo7C5Cth4vViJi+Wg 3gv14r969dkRgLqifutUy98n7yOibEl8sNfPul6NJR4lNfK0/i0bEDPNT2yBJnPZQ7+R V8RfsatWm0/jdYntRNUCUgmPBI+osG7lfdobGUnjUBceJMZp2yfsUHflcFp/bVIFcLkf KC4cZ71ltLiT2tE+sL+hACrUNADIVEV4SsanPjbnFmEtt/2ta3lLF0g3iQhEakMPIUpc qlmw== MIME-Version: 1.0 X-Received: by 10.112.169.35 with SMTP id ab3mr41534674lbc.41.1408560676695; Wed, 20 Aug 2014 11:51:16 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Wed, 20 Aug 2014 11:51:16 -0700 (PDT) In-Reply-To: <201408201115.50392.jhb@freebsd.org> References: <201408191332.48730.jhb@freebsd.org> <201408201115.50392.jhb@freebsd.org> Date: Wed, 20 Aug 2014 11:51:16 -0700 X-Google-Sender-Auth: FUnKJ5L2bieGvBna7Xl6m27YP_c Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: John Baldwin Content-Type: multipart/mixed; boundary=001a11c2696ac78693050114164b Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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, 20 Aug 2014 18:51:19 -0000 --001a11c2696ac78693050114164b Content-Type: text/plain; charset=ISO-8859-1 On Wed, Aug 20, 2014 at 8:15 AM, John Baldwin wrote: > It probably would be good to document the return codes in the man page, but > eventually they will all go away. The long term plan is to make bhyve operate > more like other hypervisors in which case a single process invocation will > mimic a power-on to power-off cycle of a machine and you wouldn't need > vmrun.sh at all (you would just run bhyve with appropriate args / config > file). In that case, the return codes will change since it won't exit for > reboots anymore. Hi, I wasn't aware of the longer term direction of bhyve. If the return codes may change in the future, I don't know if it is a good idea to document them in the man page. However, documenting the return codes in comments in the vmrun.sh script might be OK, since it is just an example that can be changed easily. What do you think of these changes to vmrun.sh: (1) Move bhyvectl --destroy outside of the while loop. It doesn't need to run if the VM has been reset. (2) Write some comments about return code of bhyve process. -- Craig --001a11c2696ac78693050114164b Content-Type: text/plain; charset=US-ASCII; name="vmrun.sh.diff.txt" Content-Disposition: attachment; filename="vmrun.sh.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hz30jy340 LS0tIHNoYXJlL2V4YW1wbGVzL2JoeXZlL3ZtcnVuLnNoLm9yaWcJMjAxNC0wOC0yMCAxMTozODow O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