SDK version must match VBox version - config you use will not work.
Nikolay On 1/17/12 11:39 AM, Bikram Gupta wrote:
Thank you. I tried that, but does not work. I used Ubuntu 11.10, Python 2.7, Virtualbox 4.1.8, SDK 3.2.12, and a plain XP guest VM.Is there something very fundamental I am missing? Regards, Bikram +++++ import sys import vboxapi vb_mgr = vboxapi.VirtualBoxManager(None, None) vbox = vb_mgr.vbox mgr = vb_mgr.mgr constants = vb_mgr.constants name = "cuckoo3" machine = vbox.findMachine(name) print "Found the machine" session = mgr.getSessionObject(vbox) try: machine.lockMachine(session, constants.LockType_Shared) except Exception, why: print "Unable to lock machine:",why #sys.exit(-1); raise # here we can do what we need with the VM print "Never reached here!" session.unlockMachine() +++++On Mon, Jan 16, 2012 at 11:53 PM, Alexey Eromenko <[email protected] <mailto:[email protected]>> wrote:Try this: vbc = vboxapi.VirtualBoxReflectionInfo(False) vb_mgr = vboxapi.VirtualBoxManager(None, None) +constants = vb_mgr.constants ... - machine.lockMachine(session, vbc.LockType_Shared) + machine.lockMachine(session, constants.LockType_Shared) No idea about this: "vbc = vboxapi.VirtualBoxReflectionInfo(False)". I never used it. -- -Alexey Eromenko "Technologov" _______________________________________________ vbox-dev mailing list [email protected] <mailto:[email protected]> https://www.virtualbox.org/mailman/listinfo/vbox-dev _______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
_______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
