From owner-freebsd-emulation@FreeBSD.ORG Mon Apr 18 14:29:34 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 7C82F106564A for ; Mon, 18 Apr 2011 14:29:34 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from groupware.itac.at (groupware.itac.at [91.205.172.99]) by mx1.freebsd.org (Postfix) with ESMTP id E82838FC13 for ; Mon, 18 Apr 2011 14:29:33 +0000 (UTC) Received: from home.bluelife.at (93.104.210.95) by groupware.itac.at (Axigen) with (AES256-SHA encrypted) ESMTPSA id 39F01B; Mon, 18 Apr 2011 16:29:33 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Mon, 18 Apr 2011 16:29:33 +0200 From: Bernhard Froehlich To: Tobias Oberstein In-Reply-To: <634914A010D0B943A035D226786325D422B76F9354@EXVMBX020-12.exch020.serverdata.net> References: <634914A010D0B943A035D226786325D422B76F91CA@EXVMBX020-12.exch020.serverdata.net> <41b7269d367ea0d98c3bd4071358d3ab@bluelife.at> <634914A010D0B943A035D226786325D422B76F9354@EXVMBX020-12.exch020.serverdata.net> Message-ID: <0cd75e5b5debaa8d6a20efeb69af90e9@bluelife.at> X-Sender: decke@bluelife.at User-Agent: Roundcube Webmail/0.5.1 X-AxigenSpam-Level: 1 X-CTCH-RefID: str=0001.0A0B020D.4DAC4ACC.00E5,ss=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Cc: freebsd-emulation@freebsd.org Subject: Re: 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: Mon, 18 Apr 2011 14:29:34 -0000 On Wed, 13 Apr 2011 05:28:44 -0700, Tobias Oberstein wrote: > Hi Bernhard, > >> > 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. >> > >> > Using that rc.d script (see attached) you can configure starting up >> > multiple VirtualBox VMs from /etc/rc.conf: >> >> Sorry it's probably my fault because you're the 3rd one who has written such >> a script but we already have one for 4.0. > > Ah, ok;) > >> >> http://svn.bluelife.at/index.cgi/blueports/view/emulators/virtualbox-ose- >> devel/files/vboxheadless.in >> >> It is a bit less complicated and can also manage multiple VMs but it does not >> have separated flags per VM. > > Mine is more complicated, yes .. but it's more or less a direct > adaption of the script for apache22. > > Also, I definitely need flags per VM, since we run each VM > > i) under a dedicated user > ii) on a separate ZFS filesystem > iii) with specific VNC port/password > > i+iii requires flags per VM. > > iii) is for obvious reasons .. need to connect to each VM on a distinct port. > > i) is for a) security and b) management of VMs by different "VM > admins" which don't have to be root or have a user which would manage > all VMs. > > == > > I there interest to consolidate our scripts? I've merged the features together and got the following: # vboxheadless_enable (bool): Set to "NO" by default. # Set it to "YES" to enable vboxheadless. # vboxheadless_machines (str): Space separated list of machines # vboxheadless_user (str): Default user account to run with # vboxheadless__name (str): VBox machine name or UUID # vboxheadless__user (str): User account to run with # vboxheadless__flags (str): Custom flags for VBoxHeadless simple example: vboxheadless_enable="YES" vboxheadless_machines="FreeBSD Ubuntu1 Machine3" complex example: vboxheadless_enable="YES" vboxheadless_machines="vm1 vm2 Machine3" vboxheadless_user="vboxuser" vboxheadless_vm1_name="FreeBSD" vboxheadless_vm1_user="user1" vboxheadless_vm2_name="Ubuntu1" vboxheadless_vm2_user="user2" vboxheadless_vm2_flags="--vnc --vncport 4711 --vncpass " I could not test it yet but will do that in the evening and commit the new script to blueports. -- Bernhard Fröhlich http://www.bluelife.at/