0

I'm running virtualbox 4.3.16 on a Windows 7 64bit host with a few Linux guests.

I need to be able to issue poweroff commands from one guest to another, but the vboxmanage command isn't working when run via cygwin's SSH server.

vboxmanage works as expected when run in a cygwin shell on the host, but via SSH vboxmanage list vms is not giving any output, and VMs cannot be accessed.

Here's what I'm getting when I try to shut down one VM over SSH:

$ vboxmanage --nologo controlvm "rsfe1" poweroff
vboxmanage.exe: error: Could not find a registered machine named 'rsfe1'
vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
vboxmanage.exe: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 95 of file VBoxManageControlVM.cpp

Trying to "attach" the VM to the sshd account doesn't work either:

$ vboxmanage registervm "d:\virtual machines\rsfe1\rsfe1.vbox"
vboxmanage.exe: error: A differencing image of snapshot {10077c46-d5cf-4402-88c0-f0458dd07f74} could not be found. Could not find an open hard disk with UUID {9404b00e-7b04-460f-8a62-6495885744de}
vboxmanage.exe: error: Details: code E_FAIL (0x80004005), component SnapshotMachine, interface IMachine, callee IUnknown
vboxmanage.exe: error: Context: "OpenMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 88 of file VBoxManageMisc.cpp

All of the VMs were created under my regular user account myuser. I am also authenticating as myuser via SSH.

I guess the problem is that the cygwin SSHd runs as a privileged user cyg_server and something does not work right on login when the session is transferred to myuser.

I have tried running the cygwin SSHd service as myuser but the service requires more privileges than the account has, it seems, and doesn't run.

Is there any solution for this? Any possible environment variable manipulation?

1

Yeah this is painful. I ended up doing an elaborate work around for this precisely because of all the issues around VirtualBox, Cygwin, authentication and the users the corresponding services run under.

A quick option for you to try, enable networking between the VMs themselves, so VBoxGuest1 can login via SSH to VBoxGuest2 directly and issue the corresponding shutdown command.

If that doesn't work, you can do what I did. I installed VBoxVMService, went to Component Services->Computers->My Computer->DCOM Config->VirtualBox Application properties and chose my Identity. Then I installed Bitvise SSH server (not Cygwin .. so if you really want Cygwin I wouldn't know what to do). Now everything works seamlessly. Might be a little long winded for what you want to do, but I would appreciate if someone else provides an answer as well.

  • Can you give a bit more detail about the VBoxVMService solution, and how it fits this particular problem? – André Fernandes Nov 5 '14 at 8:50
  • Basically the setup I have at home allows me to SSH into my Windows host and run VBoxManage commands to control the VMs. By installing VBoxVMService, I am able to run the VBox service upon boot, and since my Windows box is headless, this helps. I have every service running strictly under my user authentication, not under any global or "administrator". I install the VBoxVMService and run that on startup. – Hari Sundararajan Nov 5 '14 at 17:01
  • So if I understood correctly, you can run vboxmanage under a bitvise SSH session, regardless if you're using vboxvmservice or not? – André Fernandes Nov 5 '14 at 23:31
  • Good point. I do not know. You maybe right, it might not be necessary to run VBoxVMService, maybe just the Bitvise SSH server is running under the same permissions as the VBoxManage tool requires. I needed the VBoxVMservice to auto start a few VMs at boot time, so that might have nothing to do with what you need. – Hari Sundararajan Nov 5 '14 at 23:48
0

I had the same problem as described by André, using SSH (from a virtual CentOS 7 on the same host) into the Windows 7 Pro via BitVise SSH Server.

I can confirm that the solution described by Hari, of setting the identity in the Component Services->Computers->My Computer->DCOM Config->VirtualBox Application properties to "interactive user" (it was originally on "launching user") solved the problem (after a reboot to activate the change). I did not need to install VBoxVMService.

Andy

  • The site's Q&A format reserves answers for solutions to the question, and each answer should contribute something new. The way to indicate that an answer was useful is to upvote answers you like. – fixer1234 Nov 15 '15 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.