I have questions about the session management and the event handling.
I write a simple application to control vm machines. I found two ways to get an session
(oVBoxMgr is an instance of VirtualBoxManager)
oVBoxMgr.openMachineSession(mach, True) and oVBoxMgr.getSessionObject(vbox)
Both functions give me a session but what are the differences?
The following things i have found out:
- openMachineSession(mach, True)
- Locks the machine
- need closeMachineSession(session) at the end (unlock the machine and...?)
- getSessionObject(vbox)
- doesn't locks the machine
- need lockMachine to locks the machine
- need session.unlockMachine() at the end to unlock the machine
My second question is about the event handling.
Is there an example implementation in python for e.g. listen to an IMachineDataChangeEvent?