vboxmanage doesn't run properly with telnet

This is for discussing general topics about how to use VirtualBox.
Post Reply
camaell
Posts: 13
Joined: 24. Apr 2017, 10:22

vboxmanage doesn't run properly with telnet

Post by camaell »

Here's my problem.
I have a windows server and trying to control my virtual machines with vboxmanage. And it works fine. But when i tried to telnet my server and run vboxmanage, it doesn't work. I tried with two different accounts: privileged and unprivileged.

On the admin account it looks like working. when i typed "vboxmanage startvm "vmName", it says "vm has been succesfully started" but still, it doesn't run.

On the guest account it gives me those errors:

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: The object is not ready
VBoxManage.exe: error: Details: code E_ACCESSDENIED (0x80070005), component VirtualBoxClientWrap, interface IVirtualBoxC
lient

And i have no idea why.

NOTE: i have tried with ssh and it didn't help either. however, rdp works. but i need direct connection to the server's command prompt.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: vboxmanage doesn't run properly with telnet

Post by scottgus1 »

Virtualbox is very much a user-account-dependent program. While you can run the main Virtualbox window in any account your host PC has, the list of guests does not transfer to the other accounts unless you do special things.

If your admin account's main Virtualbox window shows your guests and the guest account does not then you have to use the admin account, unless you register the guests with the host's guest account main Virtualbox window too. And you can't switch accounts, that may shut off your guests unceremoniously. Be careful, too, of RDPing into the host and starting a guest, then disconnecting.

I'm not much of a telnet user myself, so I don't know what to do to troubleshoot. But here's a thought. If you are telneting into a not-logged-on account, there will be no place for the guest's Virtualbox window to appear. You might try running the guest headless:

Code: Select all

Vboxmanage startvm "vmname" --type headless
Then remote into the guest OS itself or RDP into the guest's Virtualbox Remote Desktop server (in the Guest's Display settings, enable RDP, set the port to a unique number besides 3389, and use the host's IP address and guest's RDP port number you chose: host.IP.add.ress:guestport#
klaus
Oracle Corporation
Posts: 1335
Joined: 10. May 2007, 14:57

Re: vboxmanage doesn't run properly with telnet

Post by klaus »

What you're seeing is probably some flavor of the Microsoft COM bug which is about 25 years old (and from the age you can estimate the probability that it will ever be fixed). Quick summary: VirtualBox uses a per-user COM server (VBoxSVC), which implements the majority of the API and does all coordination. However, Microsoft COM starts such "per-user" COM servers not once per user, but once per user session. This means the whole thing ends up with a 'split brain' kind of situation.

If you dig around on the internet there are recipes for running VMs as a service, and they contain instructions for changing the VBoxSVC registration to be a per-system COM server running for a specific user. That ensures that only one of them is there, but limits VirtualBox use to a single user.

Another solution would be not using telnet/ssh for such remote control tasks, but use vboxwebsrv (making sure it gets started by the vbox user) and control it from a client which can use the webservice.
camaell
Posts: 13
Joined: 24. Apr 2017, 10:22

Re: vboxmanage doesn't run properly with telnet

Post by camaell »

@scottgus1

Thanks for your reply. Actually i tried those things when i've already logged in the account. And i tried not just the gui mode, also the headless mode.
And i tried those commands with two different accounts because i thought maybe there is an authorization problem.
What i need is to connect the server's command line and execute vboxmanage command somehow. But for some reason neither ssh does it properly nor telnet.
I also tried put those commands in a python script and just run this. It did'nt work either.
Although it works in my machine just fine, looks like remote connection corrupts it somehow. And i can't think of why.
Last edited by camaell on 7. Jul 2017, 16:13, edited 1 time in total.
camaell
Posts: 13
Joined: 24. Apr 2017, 10:22

Re: vboxmanage doesn't run properly with telnet

Post by camaell »

@klaus

Thank you for your reply. I will try those things and let you know the result.
camaell
Posts: 13
Joined: 24. Apr 2017, 10:22

Re: vboxmanage doesn't run properly with telnet

Post by camaell »

Here's the solution:

https://sourceforge.net/p/vboxvmservice ... VmService/

Download VBoxVMService tool and add this to path for bath file operation

https://sourceforge.net/projects/vboxvm ... t/download

Run the script

After opening VirtualBox, run the DCOMCNFG command via Component Services by entering the Administrator password via VirtualBox Application-> Property-> Identity and end the operation of the bat file
Post Reply