From owner-freebsd-virtualization@FreeBSD.ORG Tue Aug 19 15:50:46 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6A77F3B; Tue, 19 Aug 2014 15:50:46 +0000 (UTC) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (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 254693E72; Tue, 19 Aug 2014 15:50:45 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id l4so5714801lbv.15 for ; Tue, 19 Aug 2014 08:50:44 -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=zph3Aj0r3TQB1lG8T08fPMndiICwRcmRolJpYWIAaiU=; b=Geme4Yu++AFu6JpMTjAedGJ4K5GKp1BCeHYM4NbRFloLftnUO8YdfuF5Bh7bA2T8LY DdYwZWRFJ4Wo3OPlXGoyEXNtkXyC1owCnVzZtQDpoW+z7EvAd4y6bXVe8H4cOBc91pil QenYX8iV61imChjsqqIyhnEOGVjKrw+ji/690dB3niaBQ3D3psPeruQMt+8cyDI2D1Pi hzG1qtAJluq9r7qCFGsO9dqkm2/C4mPDESzG6CSIZQs180e6462P0yjJPvEZmarZpcM5 dczk/W5UNZ2cENucklBpCKCvva2i7YWu+4AYwhtLG1AHO2pxcdiG93+4vOG5rJlOkNYn R1ug== MIME-Version: 1.0 X-Received: by 10.152.115.171 with SMTP id jp11mr6614lab.90.1408463443946; Tue, 19 Aug 2014 08:50:43 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.197.107 with HTTP; Tue, 19 Aug 2014 08:50:43 -0700 (PDT) In-Reply-To: <20140819154035.GA62903@kloomba> References: <20140819154035.GA62903@kloomba> Date: Tue, 19 Aug 2014 08:50:43 -0700 X-Google-Sender-Auth: dfKXo_-149mR0RHXsbBPBZgtpII Message-ID: Subject: Re: libvirt and rebooting of a bhyve VM From: Craig Rodrigues To: Roman Bogorodskiy Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 19 Aug 2014 15:50:46 -0000 On Tue, Aug 19, 2014 at 8:40 AM, Roman Bogorodskiy wrote: > Hi Craig, > > Unfortunately, I'm not sure how to get the reboot working. Moreover, I > get the same behaviour when starting bhyve manually -- when I do a > reboot, bhyve(8) exits as soon as the system is ready to restart. > > So looks like that's a default bhyve behaviour or I'm missing something? Well, if you look at /usr/share/examples/bhyve/vmrun.sh, you will see that byvectl --destroy --vm=xx ; bhyveload; bhyve is run in a loop. That loop only terminates of bhyve returns non-zero. I don't think that this is a very good API, but that's what we have for now. If there was some way to detect of the bhyve process exited due to ACPI shutdown or normal reboot, that would be helpful. That would help people writing scripts around bhyve. -- Craig