Hi,<br><br>I've tried all possible options so far, but no avail. Running the following:<br><br>- Ubuntu host 11.10<br>- Virtualbox 4.1.8<br>- Vbox SDK 3.2.12<br><br>I've made sure no other process (like virtualbox) is running on the system. My goal is to just get a session and it doesn't work. <br>
<br>+++++++++++<br><br>bikram@bikram-S3210SH:~/Cuckoo$ VBoxManage list vms<br>"cuckoo1" {800dad3e-165b-47ee-877a-5a58dbac3156}<br>"cuckoo2" {a7c01ad4-082e-4800-a911-56aebac8af2e}<br><br>bikram@bikram-S3210SH:~/Cuckoo$ VBoxManage showvminfo cuckoo1 | grep -i state<br>
State:           saved (since 2012-01-17T03:26:24.000000000)<br><br>bikram@bikram-S3210SH:~/Cuckoo$ cat test.py<br>import sys<br>import vboxapi<br><br>vbc = vboxapi.VirtualBoxReflectionInfo(False)<br>vb_mgr = vboxapi.VirtualBoxManager(None, None)<br>
vbox = vb_mgr.vbox<br>mgr = vb_mgr.mgr<br><br>name = "cuckoo1"<br>machine = vbox.findMachine(name)<br>print "Found the machine"<br><br>session = mgr.getSessionObject(vbox)<br><br>try:<br>        machine.lockMachine(session, vbc.LockType_Shared)<br>
except Exception, why:<br>        print "Unable to lock machine:",why<br>        #sys.exit(-1);<br>        raise<br><br>print "Never reached here!"<br>session.unlockMachine()<br><br>bikram@bikram-S3210SH:~/Cuckoo$<br>
<br>bikram@bikram-S3210SH:~/Cuckoo$ python test.py<br>Found the machine<br>Unable to lock machine:<br>Traceback (most recent call last):<br>  File "test.py", line 24, in <module><br>    machine.lockMachine(session, vbc.LockType_Shared)<br>
  File "/usr/local/lib/python2.7/dist-packages/vboxapi/VirtualBox_constants.py", line 710, in __getattr__<br>    raise AttributeError<br>AttributeError<br>bikram@bikram-S3210SH:~/Cuckoo$<br><br>++++++++++++++++++++++++<br>
<br>How do I debug what went wrong? All I need is a session using vboxapi.<br><br>Thanks for any suggestion/help.<br><br>Regards,<br>Bikram<br>