[Solved] Login issues on Windows guest

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
LordKaoS
Posts: 11
Joined: 29. Oct 2018, 09:04
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Ubuntu 18.04, MS Windows 7

[Solved] Login issues on Windows guest

Post by LordKaoS »

Host: Windows 10 (64)
Guest: Windows 7 (64)
Version: 5.2.22
Guest Additions: 5.2.22

In my python script, the lines

Code: Select all

runner = session.console.guest.createSession("Analyser", "project", None, None)
runner.waitFor(virtualBoxManager.constants.GuestSessionWaitForFlag_Start, 30 * 1000)
raise
File "<pyshell#2>", line 1, in <module>
runner.waitFor(virtualBoxManager.constants.GuestSessionWaitForFlag_Start, 30 * 1000)
File "C:\Users\kaos\AppData\Local\Temp\gen_py\2.7\D7569351-1750-46F0-936E-BD127D5BC264x0x1x3.py", line 4039, in WaitFor
, aTimeoutMS)
com_error: (-2147352567, 'Exception occurred.', (0, u'GuestSessionWrap', u'The specified user was not able to logon on guest', None, 0, -2135228411), None)
which seems to suggest problems with the specified credentials.

However, I've tried to do something similar with VBoxManage as

Code: Select all

VBoxManage.exe guestcontrol "AMA" --username "Analyser" --password "project" stat "C:\Project"
which seems to run fine with the output as
Element "C:\Project" found: Is a directory
The VM state is the same when running both, the script and the command: the VM is started, the OS booted up and I've signed in manually through the GUI, with the same credentials as above.

What could be the issue?
Last edited by LordKaoS on 27. Dec 2018, 13:00, edited 1 time in total.
noteirak
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: Login issues on Windows guest

Post by noteirak »

I suggest to start looking in the event log of the guest to see what was the actual auth error.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
LordKaoS
Posts: 11
Joined: 29. Oct 2018, 09:04
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Ubuntu 18.04, MS Windows 7

Re: Login issues on Windows guest

Post by LordKaoS »

The third paramenter of createSession(), domain, seems to be causing the problem. Passing it as None attempts to logon as "Analyser@None" (None interpreted as string instead of NoneType). While the SDKref states that the parameter is optional, the interpreter requires 4 parameters to call the function. A possible fix is to pass an empty string as the domain, which correctly logs on as "Analyser".
noteirak
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: [Solved] Login issues on Windows guest

Post by noteirak »

Domain login is not supported as per SDKref indeed. You need to give it null (or possibly empty string) indeed.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
LordKaoS
Posts: 11
Joined: 29. Oct 2018, 09:04
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Ubuntu 18.04, MS Windows 7

Re: [Solved] Login issues on Windows guest

Post by LordKaoS »

noteirak wrote:You need to give it null
My problem started with None (Python's null equivalent) not being handled as it should. This seems to be a bug in the python API, and I request you to look into it.
Post Reply