3

I just installed a new remote server with ubuntu 14.04, added an SSH server so I can control the server remotely through SSH. No GUI involved. Well, the server has a GUI, but I have no physical access to it.

I also installed virtualbox (using "sudo apt-get install virtualbox") and now I want to create a virtualbox VM, and install ubuntu in there as well. Is it possible to do this entirely through ssh only? Or would I need some visual/graphical interface to the VM (and thus, also to the host machine) as well?

2 Answers 2

3

The hard way - Install on a headless Virtual Box

It is possible to install Ubuntu in Virtual Box running on a headless server.

The following guide helps a lot in setting up a virtual machine from the command line (and through SSH):

This involves viewing the virtual machine's output with VRDP.

In case we can not do this we will need an unattended installation of Ubuntu:

By this we will install Ubuntu without user input on booting the remotely created VM from an installation ISO file.

The easy way - Import an existing VM to the remote Virtual Box

From above we can see that it may be much easier to set up our virtual machine on a local box to then just export the appliance. After uploading the OVF appliance to our server we can then import it to virtual box running there simply with:

VBoxManage import <name>.ovf [--dry-run] [<options>]

The option --dry-run will give you information on how the appliance will be imported, and you will also see further options on how to influence this.

-1

You should look at the VirtualBox documentation, it may be possible to do what you want from the command line, but I don't think it will be a straight forward process.

The easiest would probably be to tunnel X through SSH: Just log in with ssh -X and you can open graphical programs - their window will open on your local computer.

For console only access qemu would probably better suited because it's actually supposed to be used on the command line.

You must log in to answer this question.

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