VBoxHeadless in 10.6

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
MacJL
Posts: 10
Joined: 8. Sep 2008, 23:14

VBoxHeadless in 10.6

Post by MacJL »

Before upgrading to Snow Leopard, I could launch VM in Headless mode by ssh with a not graphically logged user via the command :

Code: Select all

VboxManage startvm Toto -type vrdp
Now in 10.6, when I do that command by ssh with a not logged user, I have this message :

Code: Select all

VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Waiting for the remote session to open...
Remote session has been successfully opened.
Tue Sep  1 10:23:17 BatCha-Serveur.local VBoxManage[281] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
If the user is graphically logged, no problem with Headless VMs. But when the session is closed, all running headless VMs are killed. Any ideas?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: VBoxHeadless in 10.6

Post by Sasquatch »

it's the same reason as when you do it on Linux. All the processes that you start from SSH are forked from one process, the connection. If you close that connection, the parent process is killed and the whole child tree goes with it. I'm guessing that this is new in SL compared to previous versions of Mac OS X. You can try it with VBoxHeadless instead of VBoxManage to see if the VM keeps running. Else run the VM through a screen session, which is kept through SSH and local use, as long as you detach it properly. You can resume screen sessions so you can continue with where you were.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mcptron
Posts: 5
Joined: 12. Sep 2009, 12:59
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Ubuntu 8.04.3 LTE Server

Re: VBoxHeadless in 10.6

Post by mcptron »

i've got the same problem with the

VBoxManage[744] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.

error message on 10.6.1 server with vb 3.0.6

unfortunately this means that i need a console autologon for the vbox user inside which the vm runs to start the vm at host startup time. will this issue be fixed at some release so that headless mode without graphical session will be possible under osx 10.6 again?

thx & rg.
michael
 Edit: : i've created now an issue for the error message: http://www.virtualbox.org/ticket/5002 
poetzsch
Volunteer
Posts: 99
Joined: 14. Feb 2008, 19:33

Re: VBoxHeadless in 10.6

Post by poetzsch »

The problem is fixed in SVN & the fix will be included in the next minor release.
ae3265
Posts: 16
Joined: 28. Oct 2009, 17:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Solaris Windows

Re: VBoxHeadless in 10.6

Post by ae3265 »

I think I'm seeing the same or related thing with VB 3.0.8 on SL 10.6.1.

When I create the launchagent to fire up my VM's, I get the same error. Is this supposed to be fixed in 3.0.8, or 3.0.9?

Thanks!
tcorning
Posts: 11
Joined: 12. Oct 2009, 19:14
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Solaris, XP, Linux
Location: Nashua, NH

Re: VBoxHeadless in 10.6

Post by tcorning »

The processes under your ssh session are getting killed, as Sasquatch mentioned. But this may depend on what your default shell is.

If you prepend "nohup" to your command, it should allow the VM to continue after the ssh session logs out. For example:
$ nohup VboxManage startvm Toto -type vrdp &
This makes the forked process ignore the "SIGHUP" signal that is sent to the child processes when you log off. Note that some shells (tcsh, for example) automatically set children to ignore SIGHUP so "nohup" may not be needed. However bash and sh would need it.

Hope this helps.

Ted
Post Reply