VirtualBox as a service

Discussions related to using VirtualBox on Windows hosts.

VirtualBox as a service

Postby evanderburg » 21. Sep 2007, 22:37

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?
evanderburg
 
Posts: 1
Joined: 21. Sep 2007, 22:36

Postby pg94au » 26. Sep 2007, 03:13

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?
pg94au
 
Posts: 4
Joined: 20. Jun 2007, 04:28

This works for me.

Postby JA_CE » 26. Sep 2007, 07:41

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)
JA_CE
 
Posts: 2
Joined: 23. Sep 2007, 05:34

Postby dlambeth » 2. Oct 2007, 14:33

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,
DLambeth
IT Director, Linux Developer
dlambeth
 
Posts: 13
Joined: 1. Oct 2007, 17:17
Location: San Antonio, TX

Postby merwin » 2. Oct 2007, 14:50

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.
merwin
 
Posts: 9
Joined: 2. Oct 2007, 09:09

VMboxvrdp at startup

Postby JA_CE » 4. Oct 2007, 06:25

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.
JA_CE
 
Posts: 2
Joined: 23. Sep 2007, 05:34

Postby dlambeth » 5. Oct 2007, 20:50

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!
DLambeth
IT Director, Linux Developer
dlambeth
 
Posts: 13
Joined: 1. Oct 2007, 17:17
Location: San Antonio, TX

Postby dlambeth » 5. Oct 2007, 21:08

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)
DLambeth
IT Director, Linux Developer
dlambeth
 
Posts: 13
Joined: 1. Oct 2007, 17:17
Location: San Antonio, TX

Postby merwin » 6. Oct 2007, 05:21

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.
merwin
 
Posts: 9
Joined: 2. Oct 2007, 09:09

Postby dlambeth » 9. Oct 2007, 17:47

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?
DLambeth
IT Director, Linux Developer
dlambeth
 
Posts: 13
Joined: 1. Oct 2007, 17:17
Location: San Antonio, TX

Postby Technologov » 11. Oct 2007, 10:45

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
Technologov
Volunteer
 
Posts: 3245
Joined: 10. May 2007, 16:59
Location: Israel

Postby Technologov » 11. Oct 2007, 10:56

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
Technologov
Volunteer
 
Posts: 3245
Joined: 10. May 2007, 16:59
Location: Israel

Postby Mugwump00 » 11. Oct 2007, 11:16

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.
Mugwump00
 
Posts: 15
Joined: 11. Oct 2007, 11:12

Postby Technologov » 11. Oct 2007, 11:23

no
Technologov
Volunteer
 
Posts: 3245
Joined: 10. May 2007, 16:59
Location: Israel

[SOLVED!] Partially

Postby dlambeth » 11. Oct 2007, 17:20

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.
DLambeth
IT Director, Linux Developer
dlambeth
 
Posts: 13
Joined: 1. Oct 2007, 17:17
Location: San Antonio, TX

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 50 guests