[VBoxVmService] -> Discussion & Support

Discussions related to using VirtualBox on Windows hosts.
debracey
Posts: 6
Joined: 2. Oct 2011, 04:24
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: Ubuntu

Re: [VBoxVmService] -> Discussion & Support

Post by debracey »

Hey,

I ended up going back to watermelon, it looks like you have some weird issues with reading that ini file because when I restarted the service after changing the ini file, it didnt pick up any of the changes I made and didn't start any of the VMs I had added.

So - something is still up with processing that file.

Dan
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

debracey wrote: Received control command: start 55
I've identified an error in VmServiceControl that might have caused this. When the command "start 5" is send to server through pipe, we'll need to write an additional null byte to terminate the pipe buffer, to make sure the buffer is not interpreted wrongly on the server side.

This problem will only occur when you run lots of VmServiceControl commands. This has been fixed in git HEAD.
gedm
Posts: 1
Joined: 2. Feb 2012, 12:49
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu

Re: [VBoxVmService] -> Discussion & Support

Post by gedm »

jerryg27 wrote:Good day.

My question: Does vboxvmservice require that the VMs themselves are also in the VBOX_USER_HOME directory? It appears that way to me.

D:\Jerry\.VirtualBox has my standard vbox xml files. (not C:\Users etc)
But using the Virtual Box GUI - I changed my install location of VMs to E:\VirtualBox VMs\

I was seeing the "Error finding machine! rc = 0x80bb0001" error when running "vmservicecontrol.exe -st 0"
I too am experiencing this problem, even after the reboot. I do have my virtual drive in a different directory to the XML files.

Here is more information from the log:
02/02/2012, 15:58:10 - List all the VMs found by VBoxVmService
02/02/2012, 15:58:10 - Error finding machine! rc = 0x80bb0001

02/02/2012, 15:58:12 - Received control command: start 0
02/02/2012, 15:58:12 - Error finding machine! rc = 0x80bb0001

02/02/2012, 15:58:48 - Received service shutdown event.
02/02/2012, 15:58:48 - Error finding machine! rc = 0x80bb0001

I'm using Windows 7 64 bit. Here is a copy of my XML file.

Code: Select all

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="URLRemovedDuetoRules" version="1.12-windows">
  <Global>
    <ExtraData>
      <ExtraDataItem name="GUI/DetailsPageBoxes" value="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
      <ExtraDataItem name="GUI/LastVMSelected" value="87b645d3-8466-496d-a8d6-e85ca4bc8eda"/>
      <ExtraDataItem name="GUI/LastWindowPosition" value="124,106,770,550"/>
      <ExtraDataItem name="GUI/RecentFolderHD" value="F:/Virtual Machines/Ubuntu 10"/>
      <ExtraDataItem name="GUI/RecentListHD" value="F:\Virtual Machines\Ubuntu 10\Ubuntu 10.vmdk;"/>
      <ExtraDataItem name="GUI/SelectorVMPositions" value="87b645d3-8466-496d-a8d6-e85ca4bc8eda"/>
      <ExtraDataItem name="GUI/SplitterSizes" value="303,463"/>
      <ExtraDataItem name="GUI/SuppressMessages" value=",remindAboutMouseIntegrationOn,remindAboutAutoCapture,showRuntimeError.warning.HostAudioNotResponding"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2012-02-03, stable, 4.1.8"/>
    </ExtraData>
    <MachineRegistry>
      <MachineEntry uuid="{87b645d3-8466-496d-a8d6-e85ca4bc8eda}" src="C:\Users\Gerard\VirtualBox VMs\Ubuntu\Ubuntu.vbox"/>
    </MachineRegistry>
    <MediaRegistry>
      <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>
    <SystemProperties defaultMachineFolder="C:\Users\Gerard\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3"/>
    <USBDeviceFilters/>
  </Global>
</VirtualBox>
If you need any other information I will be glad to help.
Mr Cheese
Posts: 6
Joined: 22. Feb 2012, 07:58

Re: [VBoxVmService] -> Discussion & Support

Post by Mr Cheese »

Hi.
I have tried using Sweet Potato 3.0 and followed the instructions to install the Vbox service onto Windows Server 2011.
As far as I can tell, everything should work, but I get the following error shown when I issue command: VmServiceControl.exe -su 0

Started your virtual machine, VM0

Error finding machine! rc = 0x80bb0001

I have been able to run my VM's as headless from the command line when logged into the host's desktop.
I am now trying to acheive this wothout having to log in.

Any tips would be aprreciated.
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

Error 0x80bb0001 means "Could not find registered machine matching nameOrId". Either VBOX_USER_HOME is set to wrong place or the folder pointed to by VBOX_USER_HOME and VirtualBox.xml can't be accessed your configured account.

If VBOX_USER_HOME is wrong, you'll need to fix it at system environment variable. If you put VMs at none default place, make sure they can be accessed by your configured account, too. After you added a new VM, you'll need to reboot once before it can be accessed by VBoxVmService. Good luck!
Mr Cheese
Posts: 6
Joined: 22. Feb 2012, 07:58

Re: [VBoxVmService] -> Discussion & Support

Post by Mr Cheese »

Thanks.
I think, as has been stated, it was to do with system env variable for VBOX_USER_HOME
Everything is now working. I have 4 virtual PC's up and running.

My next problem is how do I manage these virtual PC's now.
i.e. How can I see their status and control if needed from the host's desktop.
wolfheart_2001
Posts: 1
Joined: 6. Mar 2012, 14:18

Re: [VBoxVmService] -> Discussion & Support

Post by wolfheart_2001 »

hello,

i need someone to answer my topic
Mr Cheese
Posts: 6
Joined: 22. Feb 2012, 07:58

Re: [VBoxVmService] -> Discussion & Support

Post by Mr Cheese »

Just to note, I have this all working with the actual virtual machine files residing on a differnt drive to VBOX_USER_HOME folder.
Not that I needed to do this, but I had read in many places that the paths to the Virtual machines in the XML config file have to be absolute paths and not relative paths.

I know its only been a week, but I am still looking for tips on how I can manage and control these virtual PC's when they are running as a service.
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

Not sure exactly what you are looking for. But you can run VmServiceControl.exe to start and stop individual VM. If you need to change VM settings, you'll have to do that in VirtualBox GUI.
maxchen
Posts: 25
Joined: 27. Oct 2010, 15:57
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows

Re: [VBoxVmService] -> Discussion & Support

Post by maxchen »

one VM is running headless, auto start by VBoxVmService

1 VirtualBox GUI show the VM is powered off
2 "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" -nologo list runningvms , this cmd show nothing

GUI and command line tools will not see or know that they are running when called directly from the command line. A bug?
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: [VBoxVmService] -> Discussion & Support

Post by michaln »

maxchen wrote:GUI and command line tools will not see or know that they are running when called directly from the command line. A bug?
Not unless the VM was started as the same user which runs the GUI and/or VBoxManage.
danielckw
Posts: 4
Joined: 1. Jun 2012, 09:10

Re: [VBoxVmService] -> Discussion & Support

Post by danielckw »

michaln wrote:
maxchen wrote:GUI and command line tools will not see or know that they are running when called directly from the command line. A bug?
Not unless the VM was started as the same user which runs the GUI and/or VBoxManage.
I have been set up VBoxVmservice to use my administrator account to run the service and starts up the VMs. But the problem is , as mentioned by maxchen, GUI and command line tools still cannot see the status of the VMS with adminstrator login(same user for running the service) , this also makes me out of the control of the VM if they crash, and the last resort is to kill all the service and all the VMs shutdown.

Would you please advise what is the best practice for solving this out?
FB2000
Posts: 92
Joined: 10. Sep 2009, 13:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: CentOS

Re: [VBoxVmService] -> Discussion & Support

Post by FB2000 »

danielckw wrote:But the problem is , as mentioned by maxchen, GUI and command line tools still cannot see the status of the VMS with adminstrator login(same user for running the service) , this also makes me out of the control of the VM if they crash, and the last resort is to kill all the service and all the VMs shutdown.
I believe this is caused by a restriction on Windows called Session 0 Isolation.
http://msdn.microsoft.com/en-us/library/bb756986.aspx

The Vms started by VBoxVmService runs in session 0, while VBox GUI and controlvm command runs in session 1 (or others), they just can't see each other. There is no way to get around this limit at this moment. And you should check the VM status and start/stop them by using VmServiceControl.exe.
NoahVail
Posts: 1
Joined: 17. Jul 2012, 01:47

Re: [VBoxVmService] -> Discussion & Support

Post by NoahVail »

FB2000 wrote:I believe this is caused by a restriction on Windows called Session 0 Isolation.

The Vms started by VBoxVmService runs in session 0, while VBox GUI and controlvm command runs in session 1 (or others), they just can't see each other. There is no way to get around this limit at this moment. And you should check the VM status and start/stop them by using VmServiceControl.exe.
One way to work around this is by using the system switch in Microsoft's psexec utility (psexec is part of PSTools).
Google "PSTools" to find them. I unzip them into C:\Windows directory.

First I need to get the UUIDs of my VMs

Code: Select all

"c:\program files\oracle\virtualbox\vboxmanage" list vms
Then I can start up the VMs in session 0

Code: Select all

psexec.exe -s "c:\program files\oracle\virtualbox\vboxmanage" startvm {put your UUID here including curly brackets}
Once they're running I access them using Remote Display.

If you haven't set up Remote Display, it's in VM settings -> Display -> Remote Display -> check Enable Server -> then enter Unique Server Port for each machine ie: 3333

To use Remote Display, I launch the MS Remote Desktop Client from the Host Machine using the mstsc command.
If your Unique Server Port is 3333, in the Computer box, enter the address -> 127.0.0.1:3333

Hopefully this will help someone out.
Last edited by NoahVail on 22. Jul 2012, 06:12, edited 1 time in total.
maxchen
Posts: 25
Joined: 27. Oct 2010, 15:57
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows

Re: [VBoxVmService] -> Discussion & Support

Post by maxchen »

Does the user run the VBoxVmService need the admin rights? for example

Code: Select all

[Settings]
ServiceName=VBoxVmService
RunAsUser=.\vbs
UserPassword=U5kW8OvscGu7K
VBOX_USER_HOME=C:\Users\vbs\.VirtualBox
RunWebService=no
PauseShutdown=5000
If I remove user vbs from the Administrators groups. It seems the VBoxVmService fails to start.
Post Reply