5

I have successfully setup a virtualbox running Ubuntu server. As everything is working now, it would be sweet to run it in the background, so I've made a small bash script to start it whenever I need to access it:

#!/bin/bash
nohup VBoxHeadless -s "Ubuntu server"&

This server uses bridged networking and has a static IP set to 192.168.1.5. When I run the following from another computer in the same network, the below shown error are thrown. Why?

ssh [email protected]
ssh: connect to host 192.168.1.5 port 22: No route to host

I assumed that running headless would not affect the Virtualbox beside the fact that it's lacking the GUI?

Thanks a lot

4
  • Was ssh working to it before you started it headless ?
    – user9517
    Feb 27, 2011 at 17:00
  • and what is your host operating system ?
    – user9517
    Feb 27, 2011 at 17:16
  • @Iain: Host OP is Ubuntu 10.10 desktop, SSH works like a charm when running the normal way
    – Industrial
    Feb 27, 2011 at 17:17
  • UPDATE: Running nohup VBoxHeadless -s "Ubuntu server"& from a terminal works well, but not in my bash script...
    – Industrial
    Feb 27, 2011 at 17:33

1 Answer 1

4

It may very well be that the server is having trouble starting up, or some other random error may be occurring.

Fortunately, when you launch a headless server using VirtualBox without specifying the --vrde flag, it will automatically enable RDP (Remote Desktop Protocol) on the VM. Try connecting to your server using RDP--because VirtualBox guarantees it to be running, and doesn't depend on the guest OS, you can rule out rather its an issue with the IP, the VM, or your connection to the server itself.

The official VirtualBox documentation has more info on what kind of RDP clients are available for your system (I recommend rdesktop), and how to work with your headless system.

Best of luck, and although this isn't technically an answer, it will allow you to do some real debugging! :)

1
  • 1
    Thanks for great tips @redmumba. I did some research and found out that my syntax didn't work for some reason. Calling nohup VBoxManage startvm "Ubuntu server" --type headless& from the bash file made my Vbox start and run perfectly!
    – Industrial
    Feb 28, 2011 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .