Starting a VM with ssh: VBoxHeadless keeps the shell alive

Discussions related to using VirtualBox on Solaris hosts.
Post Reply
enrico.m.crisostomo
Posts: 4
Joined: 11. Aug 2008, 19:03

Starting a VM with ssh: VBoxHeadless keeps the shell alive

Post by enrico.m.crisostomo »

Hi all.

I'm experiencing the following problem with VBoxHeadless: I just want to start a VM from an SSH session to a Solaris Nevada box but VBoxHeadless only returns when the virtual machine shuts down. Although I try to launch it with nohup, such as in:

Code: Select all

$ nohup VBoxHeadless ... &
I won't be able to exit the sheel until the VM shuts down. VBoxManage startvm, on the other hand, doesn't exhibit this problem but, as far as I can read in VirtualBox official documentation, VBoxManage startvm is deprecated in favor of specific backend commands (such as VBoxHeadless in the case of an headless VM.)

Is there any known workaround?

Thanks in advance,
Enrico
enrico.m.crisostomo
Posts: 4
Joined: 11. Aug 2008, 19:03

Re: Starting a VM with ssh: VBoxHeadless keeps the shell alive

Post by enrico.m.crisostomo »

Ok, after a heavy headache and a session of trial-and-error, I discovered that the problem is not the standard output (or error) as I thought it was: it was standard input. I don't really know if it's an openssh problem, but this command works as expected:

Code: Select all

$ nohup VBoxHeadless ... </dev/null &
I can exit the ssh session and the VM keeps running.

Thanks anyway,
Enrico
Post Reply