[vbox-dev] VirtualBox COM works on Linux, but CRASHES on Windows !

Alexey Eromenko al4321 at gmail.com
Sun Apr 24 09:05:55 PDT 2011

On Sun, Apr 24, 2011 at 9:07 AM, Nikolay Igotti
<nikolay.igotti at oracle.com> wrote:
> Consider VirtualBoxManager() a singleton, you need to create only once. So
> smth like
> g_mgr=None
> def getMgr():
> global g_mgr
> if g_mgr is None:
> g_mgr = VirtualBoxManager(None, None)
> return g_mgr

This exactly code fails in GNS3. (in 'vboxwrapper.py')

This is because they start some 'vboxstarter' class via TCP server (in
the same python module) which spawns new thread (instead of process),
so if you initialize it twice in new thread it fails.

If you use it 'as is', it won't crash but it will refuse to start VMs,
complaining they that 'VirtualBoxManager() was marshalled from some
other thread' or findMachine() fails with: 'Object is not connected to
server'. (depends where I put the code)

Plus, doing 'del g_mgr' doesn't uninitialize it fully. It still crashes.

-Alexey Eromenko "Technologov"

More information about the vbox-dev mailing list