2010/1/8 Paul Grenyer paul.grenyer@gmail.com:
Hi
On Fri, Jan 8, 2010 at 9:15 AM, Peter Thorpe peter.3.thorpe@googlemail.com wrote:
Paul,
I'm not exactly 100% sure what you mean by running VirtualBox as a server, but I'd suggest doing:
VBoxManage --help
in a console window. And perhaps the sort of command you are looking for to run a VirtualBox guest as a server is
VBoxManage startvm <VMNAME> --type headless
Yes, that's exactly what I was looking for, thanks.
This command will not start any GUI windows for you and pretty much means that the only hope of getting to the desktop of your virtual windows machine is using remote desktop (try rdesktop on linux).
Yeah, I've used rdesktop quite a bit. However, I don't seem to be able to connect when I run in headless mode, can't even ping, even though I can see the VM registered on my router.
Hmmm...that's odd. Does the VM use DHCP to get it's address?
During my playing at work I have run into a few networky type issues with running a VM this way. I'm wondering whether VirtualBox is changing the MAC address of the machine for some reason.
But given a few minutes to boot up and get started you should soon be able to access your SQL server without needing any X GUI windows running. And the step after that is a simple init script to run this command at boot time of the machine.
I might be able to help a bit more with this if you have any questions because I am working on this at work at the moment :)
Cool! In that case, is there a way to write a script to shut down the Windows 2003 Server VM cleanly?
I believe that from the VirtualBox GUI you have the option to send an ACPI Switch Off signal to the VM. I'm guessing (don't have any of the stuff in front of me at home) that the command line should offer the same option. Although whether it actually convinces the VM to do anything useful I'm not sure. I'm sure I tried it a couple of times and it did precious little.
The VM I'm using at work is actually a CentOS VM so to shut mine down cleanly I can do a (passwordless) ssh into the machine and issue "shutdown -h now".
I'll have a closer look tomorrow when I'm in front of the scripts again.
-- Thanks Paul
Paul Grenyer e: paul.grenyer@gmail.com b: paulgrenyer.blogspot.com