0
1
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?
Can you give a bit more detail about the VBoxVMService solution, and how it fits this particular problem? – André Fernandes – 2014-11-05T08:50:20.267
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 – 2014-11-05T17:01:18.850
So if I understood correctly, you can run
vboxmanage
under a bitvise SSH session, regardless if you're using vboxvmservice or not? – André Fernandes – 2014-11-05T23:31:06.377Good 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 – 2014-11-05T23:48:44.763