[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Postby lacqui » 6. Feb 2009, 17:58

jbuturff wrote:
lacqui wrote:I've been trying to get VBoxVMService working in Vista x64. I have the following config:


Who is your service configured to run as, LocalSystem or a specific user?


The service is configured as LocalSystem. However, the startup_cli.exe test setup fails both when running as administrator and as the vbox user.

jbuturff wrote:With the service and VM shut down, have you cleaned out your LOCK, RUN and TMP folders?


Yes, all three are empty.

jbuturff wrote:Do any of the processes show up, and then go away? VBoxSVC.EXE? VBoxHeadless.exe?


If they do show up, it's too fast for me to see with Task Manager. Is there a way to log starting and ending processes?
lacqui
 
Posts: 4
Joined: 6. Feb 2009, 08:34

Postby jbuturff » 6. Feb 2009, 18:19

lacqui wrote:If they do show up, it's too fast for me to see with Task Manager. Is there a way to log starting and ending processes?

Not that I'm aware of.

The only difference I see in our config, I don't have the line for:

PathToVBoxVRDP

I assume you have opened a remote desktop and tried to connect on port 3389?

Lastly, what happens if you run this from a command prompt:

"C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe" -startvm gentoo
jbuturff
 
Posts: 20
Joined: 16. Jul 2008, 14:55

Postby lacqui » 6. Feb 2009, 19:45

jbuturff wrote:I assume you have opened a remote desktop and tried to connect on port 3389?

Yes, I've tried it unsuccessfully.

jbuturff wrote:Lastly, what happens if you run this from a command prompt:

"C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe" -startvm gentoo

That works, and I'm able to open remote desktop into it.
lacqui
 
Posts: 4
Joined: 6. Feb 2009, 08:34

Postby jbuturff » 7. Feb 2009, 15:56

I guess my last sugguestion would be to either change the user to run the VM as Administrator, or make sure your "VBOX" user is in the Administrators group and that he has "Logon as service" privilege.

If you open your Local Security Policy. Expand Local Policies=>User RIghts Assignment. Find "Log on as a service", then Add User or Group button to add your VBOX user.

After that, I'm out of ideas.... Sorry.
jbuturff
 
Posts: 20
Joined: 16. Jul 2008, 14:55

Postby lacqui » 8. Feb 2009, 14:59

jbuturff wrote:I guess my last sugguestion would be to either change the user to run the VM as Administrator, or make sure your "VBOX" user is in the Administrators group and that he has "Logon as service" privilege.

If you open your Local Security Policy. Expand Local Policies=>User RIghts Assignment. Find "Log on as a service", then Add User or Group button to add your VBOX user.

After that, I'm out of ideas.... Sorry.


Unfortunately, it appears that my edition of Vista doesn't have a local security policy editor. Thanks for the ideas though.
lacqui
 
Posts: 4
Joined: 6. Feb 2009, 08:34

Re: [VBoxVmService] -> Discussion & Support

Postby ChooseOpen » 30. Mar 2009, 22:31

I'm trying to get VBoxVmService running on Windows 2008 (yuk) and am having one heck of a time. Has anyone got it running successfully?

Code: Select all   Expand viewCollapse view
Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
03/30/2009, 12:33:18 - F:\Program Files\VirtualboxService\vms\VBoxVmService.exe
03/30/2009, 12:33:18 - F:\Program Files\VirtualboxService\vms\VBoxVmService.ini
03/30/2009, 12:33:18 - F:\Program Files\VirtualboxService\vms\VBoxVmService.log
03/30/2009, 12:33:18 - VBoxVmService
03/30/2009, 12:33:18 - OpenSCManager failed, error code = 5
03/30/2009, 12:33:18 - Failed to kill service runserv
Restarting "runserv"...


Any ideas?
ChooseOpen
 
Posts: 1
Joined: 30. Mar 2009, 22:23
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: CentOS, Win 2008, WinXP

Re: [VBoxVmService] -> Discussion & Support

Postby ahtshun83 » 21. May 2009, 10:52

Hi all experts,

I need your help to instann virtualbox as service on window server 2003 SP2.

I have installed Virtualbox on win2k3 SP2 with one virtual machines installed with CentOS 5.2

i tried to follow the instructions provided to install/setup as service & I able to install VBoxVmService.exe as window service and started the service.
however the virtual machine still went to save state when i close the window..i cannot access that machine after that...

Below are the details

machine info:Intel Xeon e5420 2.5-GHZ 2GB RAM HP Proliant
Window Server 2003 Standard Edition SP2 ( a domain controller)
VirtualBox version 2.2.2 r46594
VBoxVmService version VBoxVmService-rel20081010.zip

[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=D:\Program Files\Sun\xVM VirtualBox\VBoxSDL.exe
PathToVBoxHeadless=D:\Program Files\Sun\xVM VirtualBox\VBoxHeadless.exe
PathToVBoxManage=D:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe
RunAtDomain=computername.domain.com
RunAsUser=Administrator.FTCFILE01
UserPassword=password
[Vm0]
VmName=virtualmachine name
CommandLineUp=c:\vms\startup.exe 0
CommandLineDown=c:\vms\shutdown.exe 0
WorkingDir=C:\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=3389

Log file

05/21/2009, 18:42:29 - C:\vms\VBoxVmService.exe
05/21/2009, 18:42:29 - C:\vms\VBoxVmService.ini
05/21/2009, 18:42:29 - C:\vms\VBoxVmService.log
05/21/2009, 18:42:29 - VBoxVmService
05/21/2009, 18:42:29 - Failed to create service VBoxVmService, error code = 1073
This VM seems to be currently running. Startup call aborted.
05/21/2009, 18:44:10 - C:\vms\VBoxVmService.exe
05/21/2009, 18:44:10 - C:\vms\VBoxVmService.ini
05/21/2009, 18:44:10 - C:\vms\VBoxVmService.log
05/21/2009, 18:44:10 - VBoxVmService
05/21/2009, 18:44:10 - StartServiceCtrlDispatcher failed, error code = 1063
05/21/2009, 18:54:08 - C:\vms\VBoxVmService.exe
05/21/2009, 18:54:08 - C:\vms\VBoxVmService.ini
05/21/2009, 18:54:08 - C:\vms\VBoxVmService.log
05/21/2009, 18:54:08 - VBoxVmService
05/21/2009, 18:54:08 - Failed to create service VBoxVmService, error code = 1073
This VM seems to be currently running. Startup call aborted.

pls help!!
ahtshun83
 
Posts: 4
Joined: 19. May 2009, 06:11
Primary OS: MS Windows 2003
VBox Version: OSE other
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Postby spe05081 » 28. May 2009, 07:51

Hi and thank you for the program!
I am having some strange behaviour:
1. I can setup and successfully login into one of two VMs. However I cannot rdp to my second VM (Windows7). This is my VBoxVmService.ini:
Code: Select all   Expand viewCollapse view
[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\Program Files\Sun\xVM VirtualBox\VBoxSDL.exe
PathToVBoxHeadless=C:\Program Files\Sun\xVM VirtualBox\VBoxHeadless.exe
PathToVBoxManage=C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe
RunAtDomain=condor
RunAsUser=Thomas
UserPassword=mysupersecretpassword
[Vm0]
VmName=Ubuntu_Jaunty_Jackalope
CommandLineUp=G:\Virtual_Machines\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=G:\Virtual_Machines\vms\shutdown.exe 0
WorkingDir=G:\Virtual_Machines\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=5333
[Vm1]
VmName=Windows7
CommandLineUp=G:\Virtual_Machines\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=G:\Virtual_Machines\vms\shutdown.exe 0
WorkingDir=G:\Virtual_Machines\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=5334


The second problem I am having is that now whenever I try to open VirtualBox.exe I get a:
Code: Select all   Expand viewCollapse view
Failed to create virtualBox COM object
The Application will now terminate
Could not lock file "C:\Documents and Settings\Thomas\.VirtualBox\VirtualBox.xml"
(VERR_SHARING_VIOLATION)
Result Code: E_FAIL (0x80004005)
etc.


Any clues?
Thanks again.
spe05081
 
Posts: 5
Joined: 17. Apr 2009, 04:13
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu 9.04

Re: [VBoxVmService] -> Discussion & Support

Postby nuttinjeff » 5. Jun 2009, 16:40

Hi, this program is really great. How can Sun expect us to use Vbox without a service option? So, first off all, thanks for solving this.

Anyway, I'm trying to set this in my enterprise production server (that by now is running vmware). But it is not working... Follow the info:

Code: Select all   Expand viewCollapse view
[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=D:\Programs\Sun\xVM VirtualBox\VBoxSDL.exe
PathToVBoxHeadless=D:\Programs\Sun\xVM VirtualBox\VBoxHeadless.exe
PathToVBoxManage=D:\Programs\Sun\xVM VirtualBox\VBoxManage.exe
RunAtDomain=SADIG
RunAsUser=jeferson
UserPassword=mypassword
[Vm0]
VmName=Everest
CommandLineUp=D:\Programs\Sun\xVM VirtualBox\VBoxVmService\startup.exe 0
CommandLineDown=D:\Programs\Sun\xVM VirtualBox\VBoxVmService\shutdown.exe 0
WorkingDir=D:\Programs\Sun\xVM VirtualBox\VBoxVmService
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=8889


Code: Select all   Expand viewCollapse view
06/05/2009, 11:21:03 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:21:03 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:21:03 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:21:03 - VBoxVmService
06/05/2009, 11:21:03 - Service VBoxVmService installed
06/05/2009, 11:21:08 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:21:08 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:21:08 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:21:08 - VBoxVmService
No previously started VM operations to wait for. Continuing...
Reading global parameters...
Reading parameters for VM0...
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not find a registered machine named 'Everest'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine (Bstr(VMNameOrUuid), machine.asOutParam())" at line 1921 of file VBoxManageInfo.cpp
Using custom VRDP-Port: 8889
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not find a registered machine named 'Everest'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]), machine.asOutParam())" at line 848 of file VBoxManageModifyVM.cpp
Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
06/05/2009, 11:21:11 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:21:11 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:21:11 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:21:11 - VBoxVmService
06/05/2009, 11:21:11 - Killed service runserv
Restarting "runserv"...
06/05/2009, 11:21:14 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:21:14 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:21:14 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:21:14 - VBoxVmService
06/05/2009, 11:21:14 - Ran service runserv
Starting VM: "Everest" via vrdp as a service using account: "jeferson"...
Moving lockfile: STARTUP to RUN 
Shutting down "runserv"...
06/05/2009, 11:21:33 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:21:33 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:21:33 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:21:33 - VBoxVmService
06/05/2009, 11:21:33 - Killed service runserv
Removing temporary service "runserv"...
Removing temporary helpfiles...
No previously started VM operations to wait for. Continuing...
Reading global parameters...
Reading parameters for VM0...
Generating temporary helpfiles...
Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
06/05/2009, 11:23:10 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:23:10 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:23:10 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:23:10 - VBoxVmService
06/05/2009, 11:23:10 - Killed service runserv
06/05/2009, 11:23:12 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:23:12 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:23:12 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:23:12 - VBoxVmService
06/05/2009, 11:23:12 - Service VBoxVmService removed
Restarting "runserv"...
06/05/2009, 11:23:13 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:23:13 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:23:13 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:23:13 - VBoxVmService
06/05/2009, 11:23:13 - Ran service runserv
Shutting down serviced VM: "Everest" with option savestate running on account: "jeferson"...
Removing lockfile: RUN 
Removing lockfile: SHUTDOWN
Shutting down "runserv"...
06/05/2009, 11:23:32 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.exe
06/05/2009, 11:23:32 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.ini
06/05/2009, 11:23:32 - D:\Programs\Sun\xVM VirtualBox\VBoxVmService\VBoxVmService.log
06/05/2009, 11:23:32 - VBoxVmService
06/05/2009, 11:23:32 - Killed service runserv
Removing temporary service "runserv"...
Removing temporary helpfiles...


The XML:

Code: Select all   Expand viewCollapse view
<?xml version="1.0" encoding="UTF-8"?>
<!-- Sun VirtualBox Global Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.7-windows">
  <Global>
    <ExtraData>
      <ExtraDataItem name="GUI/UpdateCheckCount" value="2"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 m, 2009-07-04"/>
      <ExtraDataItem name="GUI/RegistrationData" value="triesLeft=0"/>
      <ExtraDataItem name="GUI/LastWindowPostion" value="127,95,770,550"/>
      <ExtraDataItem name="GUI/SuppressMessages" value=",cannotAccessUSB,remindAboutAutoCapture,confirmInputCapture,remindAboutMouseIntegrationOn,remindAboutMouseIntegrationOff"/>
      <ExtraDataItem name="GUI/LastVMSelected" value="{f99912ea-0c9f-40b1-8593-d60c4a6dc00e}"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{f99912ea-0c9f-40b1-8593-d60c4a6dc00e}" src="X:\Everest\Everest\Everest.xml"/>
    </MachineRegistry>
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{75b65601-2bc7-4dce-b538-d784d5470dcf}" location="X:\Everest_C.vdi" format="VDI" type="Normal"/>
        <HardDisk uuid="{0779b924-9b07-48c0-ad83-903cafa231f9}" location="X:\Everest_D.vdi" format="VDI" type="Normal"/>
      </HardDisks>
      <DVDImages>
        <Image uuid="{1159216f-c5b0-43a3-9aa1-38aea0dff23a}" location="D:\Programs\Sun\XVMVIR~1\VBoxGuestAdditions.iso"/>
      </DVDImages>
      <FloppyImages/>
    </MediaRegistry>
    <NetserviceRegistry>
      <DHCPServers>
        <DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.56.100" networkMask="255.255.255.0" lowerIP="192.168.56.101" upperIP="192.168.56.254" enabled="1"/>
      </DHCPServers>
    </NetserviceRegistry>
    <USBDeviceFilters/>
    <SystemProperties defaultMachineFolder="X:\Everest" defaultHardDiskFolder="X:" defaultHardDiskFormat="VDI" remoteDisplayAuthLibrary="VRDPAuth" webServiceAuthLibrary="VRDPAuth" HWVirtExEnabled="false" LogHistoryCount="3"/>
  </Global>
</VirtualBox>


I already tried with the machine uuid {f99912ea-0c9f-40b1-8593-d60c4a6dc00e} besides the name "Everest" but got the same error.

When I tried to start it with startup_cli, it finds "Everest" and show it information (like RAM, disk...) but I got the same errors after and it doesnt start properly.

Can someone help?

Thanks in regards.
nuttinjeff
 
Posts: 1
Joined: 5. Jun 2009, 16:25
Primary OS: MS Windows 2003
VBox Version: PUEL
Guest OSses: Windows 2003

some problem

Postby metaka » 22. Jun 2009, 12:18

Hi, I have one problem with vb.
I think this is correct thread to ask about it..

when i try to change my network settings on virtual machine she's crashing.
i have network connection in "disable" mod, when i try to "enable" it vb show me message that critical error has ocurred..

one more thing:
there is 4 network can added to virtual machine, i already try 3 of them [drivers: AMD PCNET Family PCI Ethernet Adapter 4.38.0.0], and all of them show me that message..

can u help me with that?
thanks.
Attachments
Logs.rar
crash logs [.log + .png]
(57.44 KiB) Downloaded 25 times
metaka
 
Posts: 1
Joined: 22. Jun 2009, 11:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: windows xp

Re: [VBoxVmService] -> Discussion & Support

Postby mattz » 14. Aug 2009, 09:54

spe05081 wrote:Hi and thank you for the program!
I am having some strange behaviour:
1. I can setup and successfully login into one of two VMs. However I cannot rdp to my second VM (Windows7). This is my VBoxVmService.ini:
Code: Select all   Expand viewCollapse view
[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\Program Files\Sun\xVM VirtualBox\VBoxSDL.exe
PathToVBoxHeadless=C:\Program Files\Sun\xVM VirtualBox\VBoxHeadless.exe
PathToVBoxManage=C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe
RunAtDomain=condor
RunAsUser=Thomas
UserPassword=mysupersecretpassword
[Vm0]
VmName=Ubuntu_Jaunty_Jackalope
CommandLineUp=G:\Virtual_Machines\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=G:\Virtual_Machines\vms\shutdown.exe 0
WorkingDir=G:\Virtual_Machines\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=5333
[Vm1]
VmName=Windows7
CommandLineUp=G:\Virtual_Machines\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=G:\Virtual_Machines\vms\shutdown.exe 0
WorkingDir=G:\Virtual_Machines\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=5334



Your first problem is most likely caused by errors within your VBoxVmService.ini file. As it is explicitly pointed out in the docs, the startup & shutdown calls within each [VmX]-section need to carry the current VM's section ID. In your case this would mean updating you settings to match these:

Code: Select all   Expand viewCollapse view
[Vm1]
VmName=Windows7
CommandLineUp=G:\Virtual_Machines\vms\startup.exe 1 BRUTEFORCE
CommandLineDown=G:\Virtual_Machines\vms\shutdown.exe 1
WorkingDir=G:\Virtual_Machines\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=5334


If this does not solve your problem, try setting a different VrdpPort for your VM1. (This should normally not be a problem - but then again it's Windows... *ggg*)

spe05081 wrote:The second problem I am having is that now whenever I try to open VirtualBox.exe I get a:
Code: Select all   Expand viewCollapse view
Failed to create virtualBox COM object
The Application will now terminate
Could not lock file "C:\Documents and Settings\Thomas\.VirtualBox\VirtualBox.xml"
(VERR_SHARING_VIOLATION)
Result Code: E_FAIL (0x80004005)
etc.



This is actually expected behaviour. Whenever you run a VM (service or no service) your Virtualbox's xml-files get locked by that instance. you can not run a VM as a service and at the same time tamper with it using Virtualbox.exe. If you need to do maintenance on your VMs with Virtualbox.exe, you will have to shut down your serviced VMs first and then wait for the VBoxSVC.exe process to terminate before starting an instance of Virtualbox.exe. This xml sharing issue has been reported and discussed several times before and comes "by design". Good luck.

---mattz
mattz
 
Posts: 95
Joined: 18. Feb 2008, 11:51
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX

Re: [VBoxVmService] -> Discussion & Support

Postby mattz » 14. Aug 2009, 13:14

nuttinjeff wrote:Hi, this program is really great. How can Sun expect us to use Vbox without a service option? So, first off all, thanks for solving this.

Anyway, I'm trying to set this in my enterprise production server (that by now is running vmware). But it is not working... Follow the info:

...


looking good so far. just to make sure potentially left over old files are cleared out before attempting a serviced start, please modify your line:

Code: Select all   Expand viewCollapse view
CommandLineUp=D:\Programs\Sun\xVM VirtualBox\VBoxVmService\startup.exe 0


to match:

Code: Select all   Expand viewCollapse view
CommandLineUp=D:\Programs\Sun\xVM VirtualBox\VBoxVmService\startup.exe 0 BRUTEFORCE


The error here:

Code: Select all   Expand viewCollapse view
ERROR: Could not find a registered machine named 'Everest'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine (Bstr(VMNameOrUuid), machine.asOutParam())" at line 1921 of file VBoxManageInfo.cpp
Using custom VRDP-Port: 8889
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not find a registered machine named 'Everest'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]), machine.asOutParam())" at line 848 of file VBoxManageModifyVM.cpp
...


is most likely to be based on faulty hardlinking of directories...

1. you need to find out which user account is being used to run the actual VBoxVmService binary. You can find this information in your computers services listing.
2. Make sure the system user running VBoxVmService has the "logon as a service" privilege!
3. you need to hardlink your users' VirtualBox.xml-file to that system users home directory. this could be for example "LocalService", sometimes "NetService" (XP) or something similar. Vista uses "Systemprofile" here...
4. Check the file "VBoxVmService-Manual-english.doc" (section "8") for further details...
mattz
 
Posts: 95
Joined: 18. Feb 2008, 11:51
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX

VBoxVmService & abiquo

Postby mattz » 14. Aug 2009, 14:16

I just found out today that abiquo uses Virtualbox & VBoxVmService within their "Middleware in a box" virtual infrastructure:

http://community.abiquo.com/display/ADP/Middleware+in+a+Box+Installation

They use a special binary to control VBoxVmService and to interact with it. I didn't look into the details but maybe someone else might find that useful. A special distro package which is containing that binary is available from here: http://zet.aluzina.org/~zeus/vms.zip


best -- mattz
mattz
 
Posts: 95
Joined: 18. Feb 2008, 11:51
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX

Re: [VBoxVmService] -> Discussion & Support

Postby FB2000 » 10. Sep 2009, 14:54

First of all, thanks to mattz for such a great tool! This is exactly what I wanted to run with VirtualBox.

However, when I tried to install on my Windows 7 64bit host and followed exactly every step as in mattz's manual, the virtual machine can never get started. I looked into calls in startup_cli.bat and find the call to runasv always failed as someone else has pointed out. I spent more hours trying to make it work and finally I find out a way. Here is the trick: you don't really need runasv and runserv to get the virtual machine start or stop. Instead, just call "VBoxManage.exe startvm" and "VBoxManage.exe controlvm" directly at the startup and shutdown batch (and thus exe) files.

Here are the steps in more details:
1. Install VBoxVmService exactly as described in the manual;
2. Go to VBoxVmService installation folder, copy two bat files, startup.bat and shutdown.bat, from subfolder src\bat to here.
3. Open startup.bat, and remove anything related to runserv, then change the line

Code: Select all   Expand viewCollapse view
echo "%VMSInstallPath%\tools\runasv.exe" "%VMSInstallPath%\tmp\u_%VmId%_sub.exe" "\%RunAtDomain%\%RunAsUser%" "%UserPassword%" > "%VMSInstallPath%\tmp\u_%VmId%_run.bat"

with something like
Code: Select all   Expand viewCollapse view
call "%PathToVBoxManage%" startvm "%VmName%" --type vrdp >> "%VMSInstallPath%\VBoxVmService.log"

also remove other lines related to "u_%VmId%_sub" and "u_%VmId%_run", you don't need them any more.

4. Do the same for shutdown.bat, but this time call VBoxManage.exe with paramater controlvm:

Code: Select all   Expand viewCollapse view
call "%PathToVBoxManage%" controlvm "%VmName%" "%ShutdownMethod%" >> "%VMSInstallPath%\VBoxVmService.log"


5. Test your modified startup.bat and shutdown.bat. If everything goes well, you could start your vitrual machine with
Code: Select all   Expand viewCollapse view
startup.bat 0

and stop it by
Code: Select all   Expand viewCollapse view
shutdown.bat 0

If you see any error in the command line or the log file, get it fixed and run the bat again.

6. Convert the bat files to exe files.

Code: Select all   Expand viewCollapse view
tools\bcompile.exe startup.bat startup.exe -hidden
tools\bcompile.exe shutdown.bat shutdown.bat -hidden


7. Now you could start and stop the VBoxVmService service and see the virtual machine started and stopped. That's it.

For those impatient, or people don't want to modify the bat files themself, I've attached here a zip file, which contains modified startup.bat, shutdown.bat, as well as converted startup.exe, shutdown.exe. Just uncompress the VBoxVmService installation folder and your VBoxVmService service should run. I hope you find it useful. Please note I've not tested my modifications on any host other than mine, so their might be errors need to be adjusted by yourself.
Attachments
vms.zip
modified startup and shutdown scripts
(11.43 KiB) Downloaded 99 times
FB2000
 
Posts: 88
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Postby ppucci » 15. Sep 2009, 08:56

Hi guys,

I am having a hard time making VmService start my vm...

- Pentium 4 3.0GHz HT
- Windows XP SP3
- VirtualBox 3.0.6 r52128
- VBoxVmService Version (rel20081009)

INI

Code: Select all   Expand viewCollapse view
[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\Program Files\Sun\VirtualBox\VBoxSDL.exe
PathToVBoxHeadless=C:\Program Files\Sun\VirtualBox\VBoxHeadless.exe
PathToVBoxManage=C:\Program Files\Sun\VirtualBox\VBoxManage.exe
RunAtDomain=MyComputer
RunAsUser=Persio
UserPassword=*****
[Vm0]
VmName=Ubuntu
CommandLineUp=c:\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=c:\vms\shutdown.exe 0
WorkingDir=C:\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=3001


the XML file is in place, with the following contents
Code: Select all   Expand viewCollapse view
  <?xml version="1.0" encoding="UTF-8" ?>
- <!--  Sun VirtualBox Global Configuration
  -->
- <VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.7-windows">
- <Global>
- <ExtraData>
  <ExtraDataItem name="GUI/UpdateCheckCount" value="3" />
  <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2009-09-16" />
  <ExtraDataItem name="GUI/SUNOnlineData" value="triesLeft=0" />
  <ExtraDataItem name="GUI/SuppressMessages" value=",remindAboutAutoCapture,confirmInputCapture,remindAboutPausedVMInput" />
  <ExtraDataItem name="GUI/LastWindowPostion" value="255,223,770,550" />
  <ExtraDataItem name="GUI/LastVMSelected" value="d52c3e5a-d233-405f-ac50-9ca0ea09c9ed" />
  </ExtraData>
- <MachineRegistry>
  <MachineEntry uuid="{d52c3e5a-d233-405f-ac50-9ca0ea09c9ed}" src="Machines\Ubuntu\Ubuntu.xml" />
  </MachineRegistry>
- <MediaRegistry>
- <HardDisks>
  <HardDisk uuid="{e9479be9-6c0e-450e-954e-33696d54c1b5}" location="C:\Documents and Settings\Persio\.VirtualBox\HardDisks\Ubuntu Server.vdi" format="VDI" type="Normal" />
  </HardDisks>
  <DVDImages />
  <FloppyImages />
  </MediaRegistry>
- <NetserviceRegistry>
- <DHCPServers>
  <DHCPServer networkName="HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" IPAddress="192.168.56.100" networkMask="255.255.255.0" lowerIP="192.168.56.101" upperIP="192.168.56.254" enabled="1" />
  </DHCPServers>
  </NetserviceRegistry>
  <USBDeviceFilters />
  <SystemProperties defaultMachineFolder="Machines" defaultHardDiskFolder="HardDisks" defaultHardDiskFormat="VDI" remoteDisplayAuthLibrary="VRDPAuth" webServiceAuthLibrary="VRDPAuth" LogHistoryCount="3" />
  </Global>
  </VirtualBox>


However, when I try to start the service, it says it cannot find a registered VM called "Ubuntu"

Log file
Code: Select all   Expand viewCollapse view
09/15/2009, 03:52:26 - C:\vms\VBoxVmService.exe
09/15/2009, 03:52:26 - C:\vms\VBoxVmService.ini
09/15/2009, 03:52:26 - C:\vms\VBoxVmService.log
09/15/2009, 03:52:26 - VBoxVmService
BRUTEFORCE: Killing all existing run- / lockfiles for this VM... 
killing: "c:\vms\run\*.vm0"
killing: "c:\vms\lock\*.DOWN.vm0"
killing: "c:\vms\lock\runserv.lock"
No previously started VM operations to wait for. Continuing...
Reading global parameters...
Reading parameters for VM0...
VirtualBox Command Line Management Interface Version 3.0.6
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not find a registered machine named 'Ubuntu'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine (Bstr(VMNameOrUuid), machine.asOutParam())" at line 1988 of file VBoxManageInfo.cpp
Using custom VRDP-Port: 3001
VirtualBox Command Line Management Interface Version 3.0.6
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

ERROR: Could not find a registered machine named 'Ubuntu'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]), machine.asOutParam())" at line 863 of file VBoxManageModifyVM.cpp
Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
09/15/2009, 03:52:30 - c:\vms\VBoxVmService.exe
09/15/2009, 03:52:30 - c:\vms\VBoxVmService.ini
09/15/2009, 03:52:30 - c:\vms\VBoxVmService.log
09/15/2009, 03:52:30 - VBoxVmService
09/15/2009, 03:52:30 - Killed service runserv
Restarting "runserv"...
09/15/2009, 03:52:33 - c:\vms\VBoxVmService.exe
09/15/2009, 03:52:33 - c:\vms\VBoxVmService.ini
09/15/2009, 03:52:33 - c:\vms\VBoxVmService.log
09/15/2009, 03:52:33 - VBoxVmService
09/15/2009, 03:52:33 - Ran service runserv
Removing lockfile: RUN 
Removing lockfile: SHUTDOWN
Removing temporary helpfiles...
Starting VM: "Ubuntu" via vrdp as a service using account: "Persio"...
Moving lockfile: STARTUP to RUN 
Shutting down "runserv"...
09/15/2009, 03:52:52 - c:\vms\VBoxVmService.exe
09/15/2009, 03:52:52 - c:\vms\VBoxVmService.ini
09/15/2009, 03:52:52 - c:\vms\VBoxVmService.log
09/15/2009, 03:52:52 - VBoxVmService
09/15/2009, 03:52:52 - Killed service runserv
Removing temporary service "runserv"...
Removing temporary helpfiles...
No previously started VM operations to wait for. Continuing...
Reading global parameters...
Reading parameters for VM0...
Generating temporary helpfiles...
Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
09/15/2009, 03:53:12 - c:\vms\VBoxVmService.exe
09/15/2009, 03:53:12 - c:\vms\VBoxVmService.ini
09/15/2009, 03:53:12 - c:\vms\VBoxVmService.log
09/15/2009, 03:53:12 - VBoxVmService
09/15/2009, 03:53:12 - Killed service runserv
Restarting "runserv"...
09/15/2009, 03:53:15 - c:\vms\VBoxVmService.exe
09/15/2009, 03:53:15 - c:\vms\VBoxVmService.ini
09/15/2009, 03:53:15 - c:\vms\VBoxVmService.log
09/15/2009, 03:53:15 - VBoxVmService
09/15/2009, 03:53:15 - Ran service runserv
Shutting down serviced VM: "Ubuntu" with option savestate running on account: "Persio"...


I have tried using the UUID from the XML to no avail.

Note: I have installed the Win 2003 Resource Kit, the latest C++ runtime, and I have .net 3.5 SP1

Heeeeeeeeeeeeeeeeeeelp!
ppucci
 
Posts: 1
Joined: 15. Sep 2009, 08:46
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu Server 9.04

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 19 guests