Page 1 of 1

[solved] headless servers - how switch RDP?

Posted: 28. Jun 2008, 23:37
by steqve
Hello!

I now have an FTP-server and a WEB-server.

Now I use them one at a time by starting them with VboxHeadless -startvm

But how do I startup two virtual machines, and then switch RDP between them?

I'd like to first start the FTP, then WEB.... Then be able to choose which to view. Mostly I don't need RDP at once since I'm using SSH to configure them. But sometimes I need "real" console. And I don't want to restart the server just to gain RDP control

Posted: 29. Jun 2008, 01:53
by TerryE
I must admit that I'd put FTP and web services on the same VM, but there you go. If you are hosting using Linux just kick off the two VBoxHeadless commands in b/g (stick an & after the command) and in Windows just issue two START commands. I am surprised that you need anything other than SSH at all. I never use the console on my servers except as a last resort which is once in a blue moon. But if you do need to RDP, what's the issue? You just connect and drop to the appropriate machine as needed. What am I missing here?

Posted: 29. Jun 2008, 10:30
by steqve
FTP and WEB are two different VMs :)

You cannot run two headless commands cause I get an error that the RDP-port ist already in use.

How do I drop to the vm when I'd like to?

I can start the two machines without the RDP-support....but I'd like to have the option to connect RDP to any of them if necessary

Posted: 29. Jun 2008, 10:44
by TerryE
Isn't that why they've added the -vrdpport option?

Posted: 29. Jun 2008, 21:25
by TerryE
Sorry, I've realised that I was a little terse in my last post, so let me explain in a little more detail.

The VirtualBox architecture uses the frontend-backend structure where the VirtualBox backend Virtual Machine Monitor (VMM) runs as a shared image attached to a front-end process which runs as a normal process within the context of the hosting machine. The VMM virtualises and encapsulates the guest OS and its applications. When guest OS "talks" to the console, a device driver in the guest OS thinks it's talking to the graphics card through a set of I/O registers. Of course these are virtualised and picked up by the VMM. The RDP service is part of the front end process running within the context of the hosting machine. The port it uses is just a normal host port, and clearly you can only have one process allocated to any given user TCP port, so if you use the headless VRDP default then clearly you can only have one headless process running. The way to get round this, of course, is to allocate a separate port for each VM that you run, so you can use --vrdpport 4000 for your FTP server and --vrdpport 4001 for your web server. Now you can locally connect to the FTP server as localhost:4000, or remotely as <WhateverYourHostIsCalled>:4000, etc..

Posted: 30. Jun 2008, 13:58
by steqve
Works like a charm! Virtualbox proves to be more and more powerful for every day :D

Posted: 30. Jun 2008, 15:39
by TerryE
Steve, Do me a favour. Go to your 1st post on this topic. You will see that it has an "edit" button on it. Click this and this allows you to edit your first post. If you put "[Solved]" at the from of the Subject title and save, you've also added [Solved] to the title of the topic. That way anyone searching for a solution to this same issue knows where to look.