Page 1 of 3

VirtualBox as a service

Posted: 21. Sep 2007, 22:37
by evanderburg
Can virtualbox run as a service? I want to be able to run a virtual machine but I do not want to have to stay logged onto the computer. Is this possible?

Posted: 26. Sep 2007, 03:13
by pg94au
Hmm.. this question keeps getting asked, and is never answered?

I can only guess the answer is 'no you cannot run VirtualBox as a service'.

Is this a planned feature?

This works for me.

Posted: 26. Sep 2007, 07:41
by JA_CE
Ok I have not yet gotten my Vm's to work as a service ( I get an error) in windows yet, But I have my VM running when the pc boots and it runs with out the dos box or windows GUI.
What I have done is made a bat file, then converted it to a ghost EXE file.

I then added a line in the Reg to Run the file each time windows starts.
I also have my Bois setup so if the host drops power it will start back up.

If you want me to go into more detail just ask. I didn't want to waist your time if this is not going to help.
( PS only way to stop VM is to RDP in and shutdown or go into the processes manager and kill the VBoxVRDP.exe service because I ghosted my EXE file)

Posted: 2. Oct 2007, 14:33
by dlambeth
Yes, can you please let me know how to do it. I've been trying to find a way to make a VM start on boot, however the instructions says to use a command line which does not work. Supposedly you can run "vboxmanage startvm <vmname> -type vrdp", but this does not work at all.

Please post back

Thanks,

Posted: 2. Oct 2007, 14:50
by merwin
Have you tried using the UID instead of the name? That command should work, starting it in RDP mode. I'm not sure whether enabling RDP in the machine config is necessary or not, but the command looks good.

VMboxvrdp at startup

Posted: 4. Oct 2007, 06:25
by JA_CE
Sorry it took awhile to get back for the reply.
If your host system is windows then there are two ways I know.
1st, as long as your host has a password then this will work fine and you won't have to login. copy and paste the VBoxVRDP.exe file to a differnt place. Next right click it and edit the properties. mine looks like this( "C:\Program Files\innotek VirtualBox\VBoxVRDP.exe" -startvm "Mail Server") don't edit the start in location.
Next, add a new scheduled task in windows make sure it starts when windows starts and let it start before you login. Add you host user name and password and save. reboot and it should be running in the back ground. I don like to see the dos box so I have a ghost exe that runs mine. that way you don't see it running.

2nd way
I have added a command in the REG so every time I login it starts.
\HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\run
Now right click and add a new string. name it then edit it and add the location were to find the batch file or exe file that you want to start. Done.
If you use a ghosted exe to run you will have to Kill the VboxVRDP process or rdp into and shut it down.
If you would like more information email me and I will sent you back my notes. Later.

Posted: 5. Oct 2007, 20:50
by dlambeth
Well if I could get by the "Error message: Failed to launch VRDP server (VERR_NOT_SUPPORTED)" error I might get somewhere.

I use VBoxManage.exe to start mine, and just add the "-type vrdp" variable, but it still will not start in headless mode either way.

I'm still struggling to get this to work in headless mode.

Ugggghhhh!

Posted: 5. Oct 2007, 21:08
by dlambeth
Here are my steps:

I type in:
>VBoxVRDP.exe -startvm W3K_DC1

Command promt shows:
VirtualBox VRDP Headless Interface 1.5.0
(C) 2005-2007 innotek GmbH
All rights reserved

Listening on port 3389
Error: failed to start machine. Error message: Failed to launch VRDP server (VERR_NOT_SUPPORTED)

Log file Shows:
00:00:00.913 VirtualBox 1.5.0 r24069 (Sep 3 2007 17:00:20) release log
00:00:00.913 Log opened 2007-10-05T19:05:45.421875000Z
00:00:00.915 Failed to launch VRDP server (VERR_NOT_SUPPORTED), error message: 'Failed to launch VRDP server (VERR_NOT_SUPPORTED)'
00:00:00.915 ERROR [COM]: aRC=0x80004005 aIID={1dea5c4b-0753-4193-b909-22330f64ec45} aComponent={Console} aText={Failed to launch VRDP server (VERR_NOT_SUPPORTED)} aPreserve=false
00:00:00.939 Power up failed (vrc=VERR_NOT_SUPPORTED, hrc=0x80004005)

Posted: 6. Oct 2007, 05:21
by merwin
Two questions:
1) Do you have VRDP enabled in the machine settings? This might affect that.
2) Are you using the community version or the closed-source version? The community version doesn't include VRDP.

Posted: 9. Oct 2007, 17:47
by dlambeth
merwin wrote:Two questions:
1) Do you have VRDP enabled in the machine settings? This might affect that.
2) Are you using the community version or the closed-source version? The community version doesn't include VRDP.
I try to enable VRDP in the GUI and shows the following error:

Failed to launch VRDP server (VERR_NOT_SUPPORTED).

Result Code:
E_FAIL (0x80004005)
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}

I'm assuming I'm using a version that's not supporting VRDP?

Where do I get the closed source version?

Posted: 11. Oct 2007, 10:45
by Technologov
The way I see VirtualBox auto-start on boot working:

1. After you start Windows, your normal user starts...
2. (XP host) Start->Accessories->System tools->Scheduled tasks
3. You make a new user: "VBoxUser" with admin privileges.
4. You write a script (*.bat) that starts VirtualBox and your VMs.
5. "Scheduled tasks" should auto-start VBox with different user "VBoxUser", with admin privileges.
--NOTE: This is possible, if you supply "VBoxUser"'s password to Scheduled Tasks.

I think we need to add that to VBox documentation (if it lacks)

-Technologov

Posted: 11. Oct 2007, 10:56
by Technologov
Opened feature-request to add this to official documentation.

See:
http://www.virtualbox.org/ticket/767

But we need to test my idea first.

-Technologov

Posted: 11. Oct 2007, 11:16
by Mugwump00
Do you have an idea on how to get all your running VMs to close to a Saved state when you shutdown/reboot?

I've tried various ways, including yours, but I've no success in getting VB to close down elegantly other than to write a "vboxmanage controlvm" script and use this whenever I want to reboot my server.

Posted: 11. Oct 2007, 11:23
by Technologov
no

[SOLVED!] Partially

Posted: 11. Oct 2007, 17:20
by dlambeth
I reverted back to Version 1.4.0 and I can now run in headless mode, although I still am unable to get it to start with a scheduled task at bootup.