<div dir="ltr">Ok, I've just noticed that there was already a thread on this topic earlier this month (I joined the dev list later, so I did not see this mail). The problem is that I am using 32 bit python on 64bit Win7. With 64bit Python the problem disappears. So currently there is no way to connect to 64 bit VBox from a 32 bit app (to get the console)? and what if I connect to a 32 bit VBox (on 32bit Win) from a 32 bit app, is this supposed to work?<div>
<br></div><div>Thanks,</div><div>Mikhail.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-30 17:23 GMT+02:00 Mikhail Kovalev <span dir="ltr"><<a href="mailto:mikhail.kovalev@gmail.com" target="_blank">mikhail.kovalev@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying to use Python API bindings on Windows to control virtualbox. I have the following problem: when I create a session and lock a non-running VM with this session, I do not get a reference to the console object. As a result, I cannot control the non-running VM (e.g., I cannot restore a snapshot). I've tried to use the following code: </div>

<div><br></div><div><div>from vboxapi import VirtualBoxManager</div><div>vbox_mgr = VirtualBoxManager(None, None)</div><div>vm = machByName(vbox_mgr, "win64") </div><div>snap = vm.findSnapshot("1")</div>

<div>session = vbox_mgr.mgr.getSessionObject(vbox_mgr.vbox)</div><div>vm.lockMachine(session, 2);</div><div># session.console == None here</div><div><br></div></div><div>I've also tried to restore a snapshot using vboxshell frontend, and I get the same result:</div>

<div><br></div><div>'NoneType' object has no attribute 'restoreSnapshot'<br></div><div><br></div><div>I've tried it on 4.3.12 and on 4.3.14 - same result. </div><div><br></div><div>For a running VM the console object is there and everything works fine. I can also start VMs using "lauchVMProcess".</div>

<div><br></div><div>Is it a bug or is it a problem of my installation?</div><div><br></div><div>Thanks in advance,</div><div>Mikhail</div></div>
</blockquote></div><br></div>