From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 12 19:35:57 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513D7106567D for ; Tue, 12 Apr 2011 19:35:57 +0000 (UTC) (envelope-from tobias.oberstein@tavendo.de) Received: from EXHUB020-4.exch020.serverdata.net (exhub020-4.exch020.serverdata.net [206.225.164.31]) by mx1.freebsd.org (Postfix) with ESMTP id 189728FC0A for ; Tue, 12 Apr 2011 19:35:56 +0000 (UTC) Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.111]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Tue, 12 Apr 2011 12:35:17 -0700 From: Tobias Oberstein To: Doug Barton Date: Tue, 12 Apr 2011 12:35:54 -0700 Thread-Topic: rc.d script for running multiple VirtualBox VMs from /etc/rc.conf Thread-Index: Acv5RxDrWuazsI8RRRmiosyizGb2hgAAH15A Message-ID: <634914A010D0B943A035D226786325D422B76F9205@EXVMBX020-12.exch020.serverdata.net> References: <634914A010D0B943A035D226786325D422B76F91CA@EXVMBX020-12.exch020.serverdata.net> <4DA4A6C7.6050803@FreeBSD.org> In-Reply-To: <4DA4A6C7.6050803@FreeBSD.org> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-emulation@freebsd.org" Subject: AW: rc.d script for running multiple VirtualBox VMs from /etc/rc.conf X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2011 19:35:57 -0000 > > I wanted to configure multiple VirtualBox VMs to startup automatically = at > boot time and generally be a nice citizen to the FreeBSD way of starting = up > stuff. >=20 > Thanks for providing this, however there are several problems, some of > which you outlined in your post. >=20 > The canonical way to do what you're suggesting is to copy the script so t= hat > you have one script per process you want to start, each with a different I've tried that first .. but for me it gets unwieldy when you need to manag= e i.e. a dozen VMs > $name. That way you avoid a lot of the complexity that you've created, an= d > everything works. Could you explain how doing it in separate scripts will solve i.e. > 2) when the system shuts down, it doesnt wait for "stop" to finish gracef= ul shutdown of VMs ? The problem is, that=20 VBoxManage controlvm ${vboxvm_name} acpipowerbutton does exit immediately. It does not wait until the VM is actually powered down. Is there i.e. a rc.d "hook" which allows me to make the shutdown process wa= it for some condition (at least up to say a limit of 20s)? What is the canonical way of doing that kind of stuff? Or is there a way of just making the shutdown delayed for 30s independent = of any of above? Thanks, Tobias >=20 >=20 > hth, >=20 > Doug >=20 > -- >=20 > Nothin' ever doesn't change, but nothin' changes much. > -- OK Go >=20 > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/