[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
Hans Eberhardt
Posts: 76
Joined: 22. Mar 2008, 01:49
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: MS Windows XP
Location: Feuchtwangen, Germany

Post by Hans Eberhardt »

Hi originofstorms,
Let the DOMAIN be empty and give it a try.
user should be the user who created the vbox.
HTH Hans
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Post by mattz »

My apologies for letting everyone wait for responses, and a *bigtime* excuse to Hans (hi there!) for not translating the docs as I said, but day to day business kept me working days and nights... My recent projects finished today, and I will be issuing the german docs by tomorrow - promise! ;-)

@originofstorms: did Hans' approach enable you to use the software? It would be a great benefit for everyone seeking assistance if the issued support would be credited by some feedback...

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

Post by mattz »

VBoxVmService rel20080422 has arrived

What's new?

Minor updates only:

A german documentation was created and the overall docs have been updated. A new flag was added to the .INI-File, enabling the configuration of individual vrdp-ports for each vm.


As always, this release is available from the official Sourceforge Site at:

http://sourceforge.net/projects/vboxvmservice




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

VBoxVmService and VirtualBox 1.6.0

Post by mattz »

If you are planning to upgrade to VirtualBox's latest version 1.6.0, you need to know the following tweak:

Since the VRDP Server controller is no longer called "VBoxVRDP.exe", but instead "VBoxHeadless.exe", you will have to update the according value in your VBoxVmService.ini-file to look something like:

PathToVBoxVRDP=C:\vbox\VBoxHeadless.exe

Additionally - after installing XP Service Pack 3, Build 5512 (Final) - I noticed that on my machine "runserv" was suddenly calling startup and shutdown commands not from "LocalService" but from "NetworkService" instead. An additional hardlink solved this issue. On a command prompt type:

fsutil hardlink create "C:\Documents and Settings\NetworkService\.VirtualBox\VirtualBox.xml" "C:\Documents and Settings\{VIRTUALBOX USER NAME}\.VirtualBox\VirtualBox.xml"


cheers, mattz
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

64 bit support

Post by firecat53 »

Hey. Great project!! Can anyone tell me if this will run on 64 bit Vista with the amd64 Virtualbox 1.6? I just don't know enough yet to know for sure!

Thanks!

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

Post by mattz »

can't tell for sure, since no one reported back a successful install here so far. there have been quite a few successful installs on 32bit vistas so far (special and required tweaks for running the tools on vista are documented in the bundled instructions). but i could estimate - since the actual programs rely on official microsoft frameworks, that are available for this platform (dotnet 2.x, visual c++ runtime 2005sp1/2008). Technically the 64bit OS is designed to also operate 32 bit software. I guess it will just be you trying and hopefully reporting back your experiences made. I will definitely check back with you later, to see if you need some installation tipps or basic install setup...

anyone has/had it running on vista64 yet, so far?
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

No luck yet on Vista 64

Post by firecat53 »

Ok. I followed all your instructions and got the service installed. It shows up on the list of services and can be started and stopped, but it never starts up the virtual machine. System info - Virtualbox 1.6 amd64, Vista 64 Ultimate, separate admin user Virtualbox, computer name mediacenter, virtual machine named test (ubuntu 8.04 server version - originally a vmware vmdk image, booted successuly in vbox 1.6 with the PAE support enabled).

I am able to start the machine successfuly using the Vboxheadless.exe from the command line.

When I run startup_cli.exe 0 (from an administrator cmd line), I get the following in a new window:

Code: Select all

No previously started VM operations to wait for. Continuing...
Reading global parameters...
Reading parameters for VM0...
Using custom VRDP-Port: 3001

C:\.VirtualBox\vms\tmp\u_0_sub.bat ==> C:\.VirtualBox\vms\tmp\u_0_sub.exe  (-hid
den)


C:\.VirtualBox\vms\tmp\u_0_run.bat ==> C:\.VirtualBox\vms\tmp\u_0_run.exe  (-hid
den)

Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
Restarting "runserv"...
Starting VM: "test" via vrdp as a service using account: "Virtualbox"...
        1 file(s) moved.
Shutting down "runserv"...
Removing temporary service "runserv"...
Removing temporary helpfiles...
Done. -- Hit any key to quit --
Here is the Vboxvmservice.ini file:

Code: Select all

[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxSDL.exe
PathToVBoxVRDP=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxHeadless.exe
PathToVBoxManage=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxManage.exe
RunAsUser=Virtualbox
RunAtDomain=mediacenter
UserPassword=password
[Vm0]
VmName=test
CommandLineUp=c:\.VirtualBox\vms\startup.exe 0
CommandLineDown=c:\.VirtualBox\vms\shutdown.exe 0
WorkingDir=C:\.VirtualBox\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=3001
VmboxVMservice Log

Code: Select all

05/06/2008, 11:33:23 - C:\.VirtualBox\vms\VBoxVmService.exe
05/06/2008, 11:33:23 - C:\.VirtualBox\vms\VBoxVmService.ini
05/06/2008, 11:33:23 - C:\.VirtualBox\vms\VBoxVmService.log
05/06/2008, 11:33:23 - VBoxVmService
05/06/2008, 11:33:23 - Killed service runserv
05/06/2008, 11:33:26 - C:\.VirtualBox\vms\VBoxVmService.exe
05/06/2008, 11:33:26 - C:\.VirtualBox\vms\VBoxVmService.ini
05/06/2008, 11:33:26 - C:\.VirtualBox\vms\VBoxVmService.log
05/06/2008, 11:33:26 - VBoxVmService
05/06/2008, 11:33:26 - Ran service runserv
05/06/2008, 11:33:45 - C:\.VirtualBox\vms\VBoxVmService.exe
05/06/2008, 11:33:45 - C:\.VirtualBox\vms\VBoxVmService.ini
05/06/2008, 11:33:45 - C:\.VirtualBox\vms\VBoxVmService.log
05/06/2008, 11:33:45 - VBoxVmService
05/06/2008, 11:33:45 - Killed service runserv
Seems like I'm so close!! I hope it's something easy!

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

Post by mattz »

Hey Scott,

everything looks fine to me so far. The problem with errors similiar to yours is mostly a faulty hardlink. You can check this by watching the tasks in Taskmanager firing up and ending while starting a vm with "startup_cli.exe":

1. Open up taskmanager, change to the processes tab and set it to show the processes for all users. Sort it by name so you can have a close look to the position in the list, where "VBoxHeadless.exe" should be appearing...

2. Open up a command prompt and start a vm using e.g. "startup_cli.exe 0" and watch your taskmanager's process list very carefully.

If you see "VBoxHeadless.exe" appear and dissapear right away, then something is wrong with the hardlink (= VboxVmService can not read the correct VirtualBox.xml-file).

If this is the case, try answering these questions to yourself:

Where is your users "VirtualBox.xml" file located and did you set a hardlink in NTFS as described in the instructions? Did you follow the tweaked instructions for vista here? (=> make the hardlink point to something like: "C:\Windows\System32\config\Systemprofile\.VirtualBox\VirtualBox.xml")

Are you using the latest version of vboxvmservice?

I'm currently in the middle of a project rollout for one of our bigger customers. It should be due by the end of this week, so i can have a a closer look to this by the upcoming weekend, if you don't have it running by then.

Cheers, mattz
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

Post by firecat53 »

Ok .... troubleshooting as per your instructions:

1. Latest version of vboxvmservice (just downloaded a few days ago)

2. Redid and triple checked the hard link. It's located at
C:\Windows\System32\config\Systemprofile\.VirtualBox\VirtualBox.xml
and points to C:\.VirtualBox\VirtualBox.xml. The hard link was created in an admin cmd shell.

I can see/open it in both places so it's definitely made the connection.

3. Opened admin cmd shell and task manager. Made sure the vboxvmservice was completely stopped w/ no associated processes running (although it did the same thing, regardless). Made sure vms/lock run and tmp folders were empty. Typed startup_cli.exe 0 and watched the task manager. Like you said, VBoxHeadless.exe appeared briefly and then disappeared. I also noticed a windows problem reporting process that briefly appeared, but there were no popups with that.

4. As an experiment I copied VirtualBox.xml to the system32/etc etc folder instead of hard linking, but got the same result.

5. I don't know if this is related or not, but I tried creating a task in the Task Scheduler to start vboxheadless on startup (as I said previously, I can successfully start the vm using vboxheadless.exe). When the task scheduler tries to start it, however, nothing happens. I also made sure it was starting as a administrative user.

Thanks for your help!

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

Post by mattz »

ok, one thing to try:

check the folders tmp, run and lock withing your vboxvmservice's install directory. delete any potential files within. an "unclean" startup sometimes leaves some trash herein, that will compromise any additional startup tryouts...

if that doesn't help:

copy startup_cli.bat from "src\bat" of the vboxvmservice's package to your install-root directory. open it up in an editor. find any line that contains a "del" command and comment them out by prepending "rem " to these lines.

try a startup by typing "startup_cli.bat 0" (it is vitally important to supply the .bat-ending here!). check out the tmp folder afterwards it should contain two batch-files and two .exe-files. open up the .bat-files in an editor an try issuing the supplied commands from within a command shell. you might want to post the contents of these files here for me to have a look at them.

best. mattz
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

Post by firecat53 »

Ok --
Already have been checking the lock run and tmp folders empty each time.
Copied startup_cli.bat to C:\.Virtualbox\vms\
Edited it and changed del ****** to rem del ******
Ran 'startup_cli.bat 0'
Contents of vms\tmp folder:
u_0_globals.bat
u_0_run.bat
u_0_run.exe
u_0_sub.bat
u_0_sub.exe
u_0_vmvals.bat
u_0_vrdpset.bat
vm0up.chk

Contents of the .bat files (4 not 2)

u_0_globals.bat
set ServiceName=VBoxVmService
set PathToVBoxSDL=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxSDL.exe
set PathToVBoxVRDP=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxHeadless.exe
set PathToVBoxManage=C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxManage.exe
set RunAsUser=Virtualbox
set RunAtDomain=mediacenter
set UserPassword=password

u_0_sub.bat
"C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxHeadless.exe" -startvm "test"

u_0_vmvals.bat
set VmName=test
set CommandLineUp=c:\.VirtualBox\vms\startup.exe 0
set CommandLineDown=c:\.VirtualBox\vms\shutdown.exe 0
set WorkingDir=C:\.VirtualBox\vms
set StartupMethod=vrdp
set ShutdownMethod=savestate
set VrdpPort=3001

u_0_vrdpset.bat
"C:\Program Files (x86)\Sun\xVM VirtualBox\VBoxManage.exe" modifyvm "test" -vrdpport 3001

u_0_run.bat
"C:\.VirtualBox\vms\tools\runasv.exe" "C:\.VirtualBox\vms\tmp\u_0_sub.exe" \mediacenter\Virtualbox "password"


Everything runs fine from the command line except the u_0_run.bat. It immediately gives:

C:\.VirtualBox\vms\tmp>u_0_run.bat

C:\.VirtualBox\vms\tmp>"C:\.VirtualBox\vms\tools\runasv.exe" "C:\.VirtualBox\vms
\tmp\u_0_sub.exe" \mediacenter\Virtualbox "password"

Running C:\.VirtualBox\vms\tmp\u_0_sub.exe...
Problems with runserv service

C:\.VirtualBox\vms\tmp>


Thanks for your help!
Scott
mattz
Posts: 95
Joined: 18. Feb 2008, 11:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WinXP/Debian/OSX
Location: Germany
Contact:

Post by mattz »

Hmmm.... runserv is little tricky... Since I didn't write it myself, I don't know too much about it's inner workings. Maybe there's some incompatibility there with the Vista x64 authentication framework. I read an article about a huge makeover on MSDN...

But this is just me guessing and frankly, I just do not know what else to tell you. Your files look good, all is set up accordingly and you should be running VboxVmService by now...

Last try: Hans brought up a hint regarding runserv-problems some time earlier in this thread -> quoted messages follow:

Problem:
I have narrowed the problem down to the runasv statement.
its very strange: if i run the u_0_sub.exe program manually, my vm starts up. but if i run "D:\vms\tools\runasv.exe" "D:\vms\tmp\u_0_sub.exe" \DOMAIN\user "password", the vm doesnt come up in the taskmgr list. no error message, either. this would normally lead me to believe that its runasv's fault, but if i use runasv to run anything else, like notepad or regedit etc, it works fine!
Hans' hint:
PostPosted: Tue Apr 15, 2008 10:22 pm

Hi originofstorms,

Let the DOMAIN be empty and give it a try.
user should be the user who created the vbox.

HTH Hans
Did you try that? At least we are getting closer....
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

Post by firecat53 »

There is definitely something up with the runserv.exe and/or runasv.exe. I've experimented with all sorts of variations of machine names, ip addresses (127.0.0.1), leaving it blank, etc., and although the runasv.exe command will say that it executes correctly, nothing will start up in the Task Manager except for a process called WerFault (Windows error reporting) which stays about as long as the runasv process runs (no gui pops up, just that process).

I tried:
runserv.exe -c
runasv.exe "C:\Windows\system32\notepad.exe" Virtualbox password

also tried with '\mediacenter\Virtualbox pasword' '127.0.0.1 Virtualbox password' and probably several other variations, all with the same results.

I also tried downloading the originals from CodeGurus, but got the same result. I don't know how to compile things for Windows (linux ..... can do!) but I don't know if that would help, or if as you say there's a more fundamental incompatibility with the 64 bit Vista.

Thanks!

Scott
firecat53
Posts: 23
Joined: 28. Apr 2008, 16:51

Post by firecat53 »

Well, I've just given up on Virtualization on Vista, period. Vmware required the use of unsigned drivers on every reboot, virtualbox seemed to be unstable, and i couldn't get the auto start/shutdown working right, and neither dealt well with raw hard disk access. Still using Vbox on my Ubuntu laptop to run xp if I need it, but on VISTA it all just sucked! Ok, I tried to be green and virtualize one of our computers, but I'm gonna have to try again someday when I have a non-vista machine to use :)

Thanks for trying to help, mattz!

Scott
fcreach
Posts: 7
Joined: 7. Jun 2008, 18:26

Post by fcreach »

Hi,

I don't have any space for put image (vdi) on C:.
Can I use the VBoxVmService ?

Thanks
Post Reply