Version: VirtualBox 5.0
Host: Windows 7
If I run VBoxManage.exe startvm VM001 --type headless as a command line (on User01) and start VirtualBox Manager GUI (VirtualBox.exe on User01) then it shows that VM001 is running, but if I run "VBoxManage.exe startvm VM001 --type headless" as a service (using NSSM) with User01 and launch VirtualBox.exe on User01 then the VirtualBox Manager GUI cannot see that VM001 is running.
How should I force VirtualBox.exe to use an already running VBoxSVC.exe instead of creating a new one on the same User01 session?
Or in other words how to run a VM01 as a headless service and using the Separate Mode to manage it using VirtualBox Manager GUI?
VM as Windows Service in Separate Mode?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: VM as Windows Service in Separate Mode?
NSSM command line help webpage has this switch:
Maybe you could use this to make the guest run under the right account?
You can also use the Remote Desktop server and a client to see the guest screen while running the guest as a service in another account.
There is another thing to do to get the GUI to notice a service-run guest, but I can't remember what it is. Something with an environment variable, or some such. Hopefully someone who knows will enlighten the both of us
Code: Select all
ObjectName: The name of the user account under which the service runs. The default is LOCALSYSTEM.
You can also use the Remote Desktop server and a client to see the guest screen while running the guest as a service in another account.
There is another thing to do to get the GUI to notice a service-run guest, but I can't remember what it is. Something with an environment variable, or some such. Hopefully someone who knows will enlighten the both of us
Re: VM as Windows Service in Separate Mode?
That is exactly what I did! I set the service to run as User01 then I started the GUI as User01.scottgus1 wrote:NSSM command line help webpage has this switch:Maybe you could use this to make the guest run under the right account?Code: Select all
ObjectName: The name of the user account under which the service runs. The default is LOCALSYSTEM.
Yes, I know about it but I want to run the VirtualBox Manager GUI to change the guest settings eg.: Change the Network Adapter (NAT, Bridge, Cable connected,...)scottgus1 wrote: You can also use the Remote Desktop server and a client to see the guest screen while running the guest as a service in another account.
That would be interesting if works well.scottgus1 wrote: There is another thing to do to get the GUI to notice a service-run guest, but I can't remember what it is. Something with an environment variable, or some such. Hopefully someone who knows will enlighten the both of us
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: VM as Windows Service in Separate Mode?
What you are trying to achieve goes against the working model of VirtualBox, which is one to isolate user environment and not share VMs.
I don't know if it is possible to achieve what you want but only the devs will be able to answer on this one.
I don't know if it is possible to achieve what you want but only the devs will be able to answer on this one.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
-
- Oracle Corporation
- Posts: 3362
- Joined: 7. Jun 2007, 09:11
- Primary OS: Debian Sid
- VBox Version: PUEL
- Guest OSses: Linux, Windows
- Location: Dresden, Germany
- Contact:
Re: VM as Windows Service in Separate Mode?
I cannot explain how this works for Windows but on non-Windows systems, it's all about which user is used. The XPCOM code searches for the directory /tmp/.vbox-$USER-ipc. It needs to have permissions to read this directory. The file lock within this directory contains the PID of the current running VBoxXPCOMIPCD service which is responsible for finding the VBoxSVC service. And ipcd is a socket used to communicate with VBoxSVC.
Someone else will have to comment the Windows bits.
Someone else will have to comment the Windows bits.
-
- Posts: 4
- Joined: 1. Aug 2016, 20:26
Re: VM as Windows Service in Separate Mode?
Hi there. I been running vboxvmservice along side phpvirtualbox and they show the same vms state. They are both running with the same user.
But when I open vbox gui the state is not shared even though is the same user.
Is there a way to make them share the state?
I know its probably something to do with user permissions, even when I use the same user for everything the service and the gui dont share state.
Anybody knows if there is something to do?
thanks
But when I open vbox gui the state is not shared even though is the same user.
Is there a way to make them share the state?
I know its probably something to do with user permissions, even when I use the same user for everything the service and the gui dont share state.
Anybody knows if there is something to do?
thanks