From owner-freebsd-emulation@FreeBSD.ORG Tue Feb 4 23:44:19 2014 Return-Path: Delivered-To: freebsd-emulation@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 4535FA2E for ; Tue, 4 Feb 2014 23:44:19 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 198471AFA for ; Tue, 4 Feb 2014 23:44:19 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id y13so8831173pdi.23 for ; Tue, 04 Feb 2014 15:44:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=EHpSTh+qJ8IJC55zwkrK7vQjUGUDIAZdz+H1z3n4ZVo=; b=Z23OhUag5HpHEb93MRDjDn3vSQOpQZ4LzrI0LlEQXcSCa71f5WwmbqiZArej64iB/r 2oI/ryCVSLjYA8cVYyC5/8CLe67PBYRpXmgtYZHuMArgwDT7fQrL+GZa1TtVUJ2MbauJ nuQk8OOHP5TSv5m/d8B33FXq+zYtsEhOQRM3yN3ihhmHOyxZpV+ylCL4a6ud+PNRavK/ YdU0k64HdPMdRY5BJ/GFOpB/MC3Rz/rgK5XE4suD5ulrT/5FUXXNGpeebLXehnwZZscs k6eiqqdDMURMFrUuFHxx1ZDWZiSNt1AGzyLP+o5uhr0K4t9Vl6fhmlFTq+mFqCunpEjF /YoA== MIME-Version: 1.0 X-Received: by 10.69.20.139 with SMTP id hc11mr47168128pbd.63.1391557458346; Tue, 04 Feb 2014 15:44:18 -0800 (PST) Received: by 10.68.155.38 with HTTP; Tue, 4 Feb 2014 15:44:18 -0800 (PST) In-Reply-To: <20140204203926.45115b26@Papi> References: <20140204203926.45115b26@Papi> Date: Tue, 4 Feb 2014 18:44:18 -0500 Message-ID: Subject: Re: Fw: VirtualBox 4.3.6 headless startup script (WAS:keyboard repeats keystrokes) From: Aryeh Friedman To: Mario Lobo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-emulation@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.17 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, 04 Feb 2014 23:44:19 -0000 On Tue, Feb 4, 2014 at 6:39 PM, Mario Lobo wrote: > > FYI > > Sorry! Forgot to reply to the list. My bad. > > -- > Mario Lobo > http://www.mallavoodoo.com.br > FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] (99% winblows FREE) > > "UNIX was not designed to stop you from doing stupid things, > because that would also stop you from doing clever things." > > > > Begin forwarded message: > > Date: Tue, 4 Feb 2014 20:26:16 -0300 > From: Mario Lobo > To: Aryeh Friedman > Subject: Re: VirtualBox 4.3.6 headless startup script (WAS:keyboard > repeats keystrokes) > > > On Tue, 4 Feb 2014 17:30:07 -0500 > Aryeh Friedman wrote: > > > On Tue, Feb 4, 2014 at 5:24 PM, Mario Lobo wrote: > > > > > On Tue, 4 Feb 2014 04:58:28 -0500 > > > Aryeh Friedman wrote: > > > > > > [snip..] > > > > > > > > > > >... the > > > > other option is vbox but I simply can't figure out how to run it > > > > headless (from a boot script specifically) this combined with the > > > > fact that unclear from Oracle's documentation if such a mode is > > > > possible > > > > > > Aryeh; > > > > > > Could you elaborate more on that?. I ask this because I've been > > > running different windows vbox vms on a freeBSD host, no X installed > > > (initially) , and they boot headless whenever the server boots. I > > > created service scripts to start/stop them from /usr/local/etc/rc.d. > > > > > > I said initially because I wasn't too akin to creating VMs from > > > command line, and opted for the vbox qt GUI to create them. > > > > > > > Last summer when I was attempting to do a ground up install of open > > stack (something that later provided impossible due to outright > > errors and missing information in the openstack manuals and that and > > the testing requirements of an other project lead to petitecloud) I > > did so (at least for the first few attempts) use vbox and every time > > I tried to run a client headless after I installed it with -gui it > > refused to start (windows much more often linux but both did the > > same)... I was never able to get a full working fbsd boot->vbox > > boot->vm box sequence working automatically (I also knew a lot less > > about virtualization then so it might be just confused memory that > > makes me believe this is not possible)... either way if you can > > either send me the scripts or post them and I can intergrate them > > into petitecloud I will be asking about how to send you $50. > > Sure thing, Aryeh ! > I will test this later tonight if it works PetiteCloud 0.2.5 (we are very near code freeze for 0.2.4) will have vbox as a supported hypervisor.... > > I'll share to the list so everyone can benefit from it, if > useful. > > I created the script x-vms (bellow) and placed it > in /usr/local/etc/rc.d. > > Added the line "vms_anable=YES" to /etc/rc.conf > > In our environment, the script starts (after network REQUIRE) 4 > different VMs: W2008, PfSense, W7 and W2012. > > For the shutdown, the VM OSes must "respect" the ACPI command. These > four do, but I've come across some that didn't. > > 3 of the VMs have RDP/VNC disabled so the only way to access them is > via the OS mechanisms (RDP/web interface) > > The win7 VM, I enabled VBOX vnc interface on the host, by > running these: > > VBoxManage setproperty vrdeextpack VNC > VBoxManage modifyvm Win7 --vrdeproperty VNCPassword=whatever > VBoxManage modifyvm Win7 --vrdeproperty VNCAddress4=172.16.3.1 > VBoxManage modifyvm Win7 --vrdeproperty VNCPort4=5901 > VBoxManage modifyvm Win7 --vrdeauthlibrary null > > which actually adds this to the VM config file: > > authLibrary="null"> > > > > > > > > > I did this because a needed to access the VM from outside its internal > interface methods. > > There is one thing that I should mention, which probably has more to do > with X-forwarding in ssh than with Vbox. > > When all the VMs are running and I ssh to the FBSD host, I start up the > qt GUI (VirtualBox). It comes up fine. I can create and do everything > from it EXCEPT start any machine. If I try to start (to see/test if it > comes up fine), it complains tha it could no allocate an X session for > it. > > But if I close VirtualBox GUI and start the machine from VBoxSDL, it > comes up fine !! > > > Well, there you have it. > > As for the $50, if what I posted proves useful to you, please save it! > If we ever meet some day, a nice cold beer for both of us will be on > you :) ! > > Best wishes, > > -- > Mario Lobo > http://www.mallavoodoo.com.br > FreeBSD since 2.2.8 [not Pro-Audio.... YET!!] (99% winblows FREE) > > "UNIX was not designed to stop you from doing stupid things, > because that would also stop you from doing clever things." > > > [ script x-vms ]================================== > > #!/bin/sh > # > # > > # PROVIDE: vms > # REQUIRE: DAEMON pf > # KEYWORD: shutdown > > . /etc/rc.subr > > name="vms" > rcvar=${name}_enable > start_cmd="vms_start" > stop_cmd="vms_stop" > > vms_start() > { > > echo "Starting VMs." > /usr/X11R6/bin/VBoxHeadless -startvm vrecallen24 --vrde off & > /usr/X11R6/bin/VBoxHeadless -startvm pfSense --vrde off & > /usr/X11R6/bin/VBoxHeadless -startvm Win7 & > /usr/X11R6/bin/VBoxHeadless -startvm Win2012 --vrde off& > } > > vms_stop() > { > echo "Shutdown VMs." > /usr/X11R6/bin/VBoxManage controlvm vrecallen24 acpipowerbutton > /usr/X11R6/bin/VBoxManage controlvm pfSense acpipowerbutton > /usr/X11R6/bin/VBoxManage controlvm Win7 acpipowerbutton > /usr/X11R6/bin/VBoxManage controlvm Win2012 acpipowerbutton > } > > > load_rc_config $name > run_rc_command "$1" > > ========================================================= > > > > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to " > freebsd-emulation-unsubscribe@freebsd.org" > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org