[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
Post Reply
mrpeggit
Posts: 2
Joined: 22. Jul 2008, 17:01

Post by mrpeggit »

mattz wrote:the runfiles will be deleted last in the shutdown process, so it might be that your system just doesnt stay active long enough to kill all files.
I was planning to add a "brute force clearup" option to the service on startup, since i encountered similar problems on two or three machines. I just didn't find an option to prioritize the vboxvmservice to be an "early shutdown candidate" within a reboot or halt sequence yet. any suggestions here, anyone?
This seems to be the problem. The virtual machine is powered down but the runfile has not been deleted.

Hopefully your work can be integrated into VirtualBox soon so everybody can use this really great feature without any hassle. Thanks for your work so far!
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 rel20080728 has arrived

What's new?

Added a BRUTEFORCE option to the startup-calls. This will kill any possibly remaining run- or lockfiles for a VM before startup.
The non-cli versions of startup and shutdown now save all their outputs to the logfile.


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

http://sourceforge.net/projects/vboxvmservice




Cheers, mattz


@mrpeggit: Hope this does the trick for now. :-)
Last edited by mattz on 28. Jul 2008, 02:58, edited 1 time in total.
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 »

Example usage of the bruteforce-feature:

Code: Select all

[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\vbox\VBoxSDL.exe
PathToVBoxVRDP=C:\vbox\VBoxHeadless.exe
PathToVBoxManage=C:\vbox\VBoxManage.exe
RunAsUser=VboxUser
RunAtDomain=winserver
UserPassword=vboxsecret123
[Vm0]
VmName=ubuntuserver-dev
CommandLineUp=c:\vms\startup.exe 0 BRUTEFORCE
CommandLineDown=c:\vms\shutdown.exe 0
WorkingDir=C:\vms
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=3389 
nimrod
Posts: 5
Joined: 5. Aug 2008, 17:09

VBoxVMService not starting Virtual Machines

Post by nimrod »

Thanks for the great program, exactly what I needed.

I thought people might be interested in the problem I just encountered though.

VBoxVMService started fine, and everything looked like it was working perfectly (all the right messages, and the correct tmp, run & lock files). However no virtual machines were starting and no VBoxVRDP.exe appeared in the task manager.

After a few hours of going in circles trying different things, I noticed that I didn't have a VBoxVRDP.exe (there's a DLL and an LNK). I tried replacing it in VBoxVMService.ini with VBoxHeadless.exe (see below) and it works like a dream.

PathToVBoxVRDP=C:\Progra~1\sun\xvmvir~1\VBoxHeadless.exe


I'm using version 1.6.2 of Sun xVM VirtualBox.


I hope this helps someone else avoid the pain I went through.

Thanks again,
Colin :D
nimrod
Posts: 5
Joined: 5. Aug 2008, 17:09

...I spoke too soon

Post by nimrod »

I just had further trouble with this.

It worked fine using the start_cli.exe, which I assumed meant that it was all good. However after rebooting to test it didn't work, back to the same symptoms.

I just worked out that it only works using start_cli.exe when the VirtualBox GUI is open. That's obviously not good.
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:

Re: VBoxVMService not starting Virtual Machines

Post by mattz »

nimrod wrote:Thanks for the great program, exactly what I needed.

I thought people might be interested in the problem I just encountered though....
Reading earlier posts (or the release notes) would have saved you quite some time (here my post related to the 1.6.0 release):
mattz wrote: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
...
Your latest problems relate most certainly to runfiles not being deleted on shutdown and a solution to this issue was presented with the latest release and explained three posts earlier. I am happy that you find this hack useful but I have to encourage you to read previously posted information more carefully. This saves both the users and the supporters time to concentrate on actually unreported errors. Furthermore I have to insist on at least some basic infos on your system and setup (as posted earlier in this thread). It's kind of hard trying to guess your software- and systemlayout... #

Once again: Future support inquiries will only be answered, if they have not yet been met by the issued release-information or previously granted assistance. Also posts not including your windows + service pack versions, virtualbox-version and vboxvmservice release id plus your VBoxVmService.ini-Files content will not be treated.

Please remember: This is free software and I use my sparetime trying to support the users the best possible way. So the least I can ask for, is to meet these few requests...


--mattz
nimrod
Posts: 5
Joined: 5. Aug 2008, 17:09

Sorry

Post by nimrod »

Sorry mattz, I didn't mean to cause offence. :(

I did read the first couple of pages of the forum before I downloaded the software, but I didn't realise it later turned into an extension of the documentation. So i didn't know about your request for my details, or the other problem solutions.

I appreciate that you are doing all this in your spare time (I thank-you a lot for all your efforts), which is why I wasn't actually expecting any help, i was just trying to share my experiences to help others.


Here are the details you wanted:
  • - Windows XP Pro (32 bit)
    - SP3
    - Sun xVM VirtualBox 1.6.2
    - VBoxVMService Ver: 2008-07-28
VBoxVMService.ini:

Code: Select all

[Settings]
ServiceName=VBoxVmService
PathToVBoxSDL=C:\Progra~1\sun\xvmvir~1\VBoxSDL.exe
PathToVBoxVRDP=C:\Progra~1\sun\xvmvir~1\VBoxHeadless.exe
PathToVBoxManage=C:\Progra~1\sun\xvmvir~1\VBoxManage.exe
RunAsUser=virtual.box
RunAtDomain=read
UserPassword=********

[Vm0]
VmName=Ubuntu-SVN
CommandLineUp=c:\progra~1\VBoxVMService\startup.exe 0
CommandLineDown=c:\progra~1\VBoxVMService\shutdown.exe 0
WorkingDir=C:\progra~1\VBoxVMService
StartupMethod=vrdp
ShutdownMethod=poweroff
VrdpPort=3390

[Vm1]
VmName=Vista
CommandLineUp=c:\progra~1\VBoxVMService\startup.exe 1
CommandLineDown=c:\progra~1\VBoxVMService\shutdown.exe 1
WorkingDir=C:\progra~1\VBoxVMService
StartupMethod=vrdp
ShutdownMethod=savestate
VrdpPort=3391
(I've tried with just one VM entry)

I haven't had a chance to look into this much more today as I've been in meetings, but having read the whole forum now, I don't think the solution is in there. I tried adding the extra HardLink in addition to the LocalService one, but that hasn't made any difference to my current problem (although it may have become an issue later).


It doesn't seem to be a problem with the run/tmp/lock files not being removed, as I'm deleting them after each failed attempt.


When I call start_cli.exe 0 (or 1) from the command line (after removing any run/tmp/lock files) it runs through without any errors. VBoxHeadless.exe does pop up in the Task Manager, but goes again straight away.

Output when failing to start:

Code: Select all

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

C:\Program Files\VBoxVMService\tmp\u_0_sub.bat ==> C:\Program Files\VBoxVMServic
e\tmp\u_0_sub.exe  (-hidden)


C:\Program Files\VBoxVMService\tmp\u_0_run.bat ==> C:\Program Files\VBoxVMServic
e\tmp\u_0_run.exe  (-hidden)

Installing temporary service "runserv"...
Shutting down "runserv" to avoid malfunctions...
Restarting "runserv"...
Starting VM: "Ubuntu-SVN" via vrdp as a service using account: "virtual.box"...
Moving lockfile: STARTUP to RUN
Shutting down "runserv"...
Removing temporary service "runserv"...
Removing temporary helpfiles...
Done. -- Hit any key to quit --

When I do the same thing with the VirtualBox GUI open the VBoxHeadless.exe stays open, and I can access the VM. This makes no sense to me.

I'm going to keep playing with it, but I have no idea what is different with the VBox GUI open. Maybe it's a sort of red herring.

Thanks mattz,
Colin :)
nimrod
Posts: 5
Joined: 5. Aug 2008, 17:09

That was painful!

Post by nimrod »

I solved it!!!

After much painfull investigation I got down to the point of running the contents of the u_0_run.bat (which becomes u_0_run.exe). Which is thus:

Code: Select all

"C:\Program Files\VBoxVMService\tools\runasv.exe" "C:\Program Files\VBoxVMService\tmp\u_0_sub.exe" \read\virtual.box "******"
This was still resulting in the same thing.

I tried making it call u_0_sub.bat rather than the exe, which I was surprised to find was ok, but still didn't work.

My breakthrough came when I added the following to the end of the line in u_0_sub.bat...

Code: Select all

 > c:\output.log
This successfully caught the output of the call to VBoxHeadless.exe, which revealed that I was apparently calling an invalid VM name. This showed me that it was an issue with access, not a setup issue.

The actual issue eventually turned out to be the fact that my VirtualBox.xml file was referencing the VDI and MACHINE directories relatively. After changing this to fully qualified paths it worked. I don't understand why this would make a difference because it should be running as the virtual.box user in whose directory structure they reside.

Here's what I changed...

from:

Code: Select all

...
<MachineEntry uuid="{195feec8-eb7c-4048-8db6-8b0c305e015f}" src="Machines\Ubuntu-SVN\Ubuntu-SVN.xml"/>
...
<VirtualDiskImage filePath="VDI\Ubuntu-SVN.vdi"/>
...
to:

Code: Select all

...
<MachineEntry uuid="{195feec8-eb7c-4048-8db6-8b0c305e015f}" src="c:\docume~1\virtual.box\.VirtualBox\Machines\Ubuntu-SVN\Ubuntu-SVN.xml"/>
...
<VirtualDiskImage filePath="c:\docume~1\virtual.box\.VirtualBox\VDI\Ubuntu-SVN.vdi"/>
...

Now I just have to find the fix that stops it leaving the run files behind, and it'll be all good. :wink:
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:

Re: That was painful!

Post by mattz »

nimrod wrote:I solved it!!!

Now I just have to find the fix that stops it leaving the run files behind, and it'll be all good. :wink:
First off: It's not that easy to actually offend me. :-) I have to say: Good job and quite a great hint for future users. I will definitely add this to the appropriate section of the manual.

The option to kill any left over runfiles is "BRUTEFORCE" which needs to be added to the startup-calls for each VM within the VBoxVmService.ini-file.

So try this one:

Code: Select all

CommandLineUp=c:\PATH-TO-YOUR\startup.exe 0 BRUTEFORCE 
Good luck!

--mattz
nimrod
Posts: 5
Joined: 5. Aug 2008, 17:09

Thanks

Post by nimrod »

Thank mattz.

It's all running like a dream now!! I can't tell you how happy I am to have this working. :D

Thanks, Colin 8)
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

mattz wrote:yet again, i have to promote vboxvmservice ...
Mattz, the thing about vboxvmservice is that we don't have a crisp integrated user guide which you can point users to. What we have is complex discussion with over 60 posts in it. What you should consider doing is a trick that I've learnt on other forums and started to use here which is to have two topics: one of which is your documentation / tutorial which only you post to and a link to a separate discussion topic. You can then use the posts within the main topic to create a chapter structure. I realise that this is a bit of a cludge, but it can be made to work.

Normally we would lock the main topic, so that only moderators post to it. Hover we can't in this case, but what we can do is if you put at the the end of the main topic a general comment "please use XXX (hyperlink) to discuss this. Any posts here will be deleted by the moderators" then we can police this for you. I would suggest that you might be an appropriate candidate for a moderator to this forum, but even though you clearly have a lot of expertise in VBox, you don't really contribute to the forum other than on the single subject of vboxvmservice.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
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 »

TerryE wrote: ... but even though you clearly have a lot of expertise in VBox, you don't really contribute to the forum other than on the single subject of vboxvmservice.
Hi TerryE, you are absolutely right - my contributions here are focussed on VBoxvmservice and you are correct about this thread, as well. It really is becoming a little "difficult" to follow. Yet again there is a user guide bundled with VBoxVmService (available in english and german).
I leave the judgement on it's "crispness" to others. *gg*

My contributions to other topics here are very limited, since I run a startup software-company with a few great people working there and I carry a responsibility for them, so my focus is clearly there.

Furthermore my gorgeous fiance (still) likes me being around from time to time in real life... :-)

So let's pick up your great idea and ask a mod to start two threads.
I suggest:

"VBoxVmService - Announcements"
"VBoxVmService - Discussion & Support"

It would be great if the posts from this thread could be sorted/splitted accordingly to these new topics. Any mod here, who is willing to spare an hour of his time?

--mattz


PS: I will definitely continue to support VBoxVmService the best possible way, since it has become one of my favorite projects.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Mattz, the easiest way is to create a new topic to act as the tutorial, and then make this post the discussion by editing / replacing the first post changing the title and making it into a discussion preamble. If you don't want to fight the BBCode crap, I'll make you an offer: if you sent me your draft of the tutorial in RTF / DOC / ODT format I have some magic macros which automate most of the conversion, and I'll put up your tutorial and swap the stickies around. My email is my user id at OpenOffice.org. //Terry
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
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 »

TerryE wrote:Mattz, the easiest way is to create a new topic to act as the tutorial, and then make this post the discussion by editing / replacing the first post changing the title and making it into a discussion preamble. If you don't want to fight the BBCode crap, I'll make you an offer: if you sent me your draft of the tutorial in RTF / DOC / ODT format I have some magic macros which automate most of the conversion, and I'll put up your tutorial and swap the stickies around. My email is my user id at OpenOffice.org. //Terry
Ok, you should have my email by now.

--mattz
diogoscs
Posts: 5
Joined: 5. Aug 2008, 20:22

Post by diogoscs »

hi guys,

I read all the posts, but I couldn't solve my problem! I have the same problem of Shriike, but he disapeared and I don't know if he solve too.
My OS is a Windows 2003 Server Enterprise R2, and the #$!#$ vboxheadless.exe never show in taskmanager, only the vboxsvc... i'm really crazy! I wondering if this problem is the same that the Vista...

thanks guys
Post Reply