From owner-freebsd-virtualization@FreeBSD.ORG Fri Feb 28 08:55:13 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 79A9148F for ; Fri, 28 Feb 2014 08:55:13 +0000 (UTC) Received: from mail.monkeybrains.net (mail.monkeybrains.net [208.69.40.19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 600B611AE for ; Fri, 28 Feb 2014 08:55:13 +0000 (UTC) Received: from Birdhouse-o-My.local (208-90-212-98.PUBLIC.monkeybrains.net [208.90.212.98]) (authenticated bits=0) by mail.monkeybrains.net (8.14.7/8.14.7) with ESMTP id s1S8tCr0017529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 28 Feb 2014 00:55:12 -0800 (PST) (envelope-from crapsh@monkeybrains.net) X-Authentication-Warning: mail.monkeybrains.net: Host 208-90-212-98.PUBLIC.monkeybrains.net [208.90.212.98] claimed to be Birdhouse-o-My.local Message-ID: <53104EF0.9080902@monkeybrains.net> Date: Fri, 28 Feb 2014 00:55:12 -0800 From: "Rudy (bulk)" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: NEEDS TESTING - rc script for bhyve Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.98.1 at mail.monkeybrains.net X-Virus-Status: Clean X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 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: Fri, 28 Feb 2014 08:55:13 -0000 OK, I did test it a bit. Really, I wanted something short to automate booting, but I ran into some issues that ballooned up the script. Things I put into the script: 0 - does no provisioning, I only want a start/stop script 1 - adds vmtab for configuring VMs 2 - supports grub loader 3 - uses nmdm 4 - runs VM with a heatbeat and automatically restarts unless the 'stop' is run 5 - 'stop' sends a graceful shutdown and the heartbeat loop doesn't restart as the pidfile is nuked 6 - catches stalled bhyveloader and kills it https://www.monkeybrains.net/support/bhyve.rc Rudy