[vbox-dev] How to start a VM from Python/COM ?

Alexey Eromenko al4321 at gmail.com
Mon Jan 31 07:55:12 GMT 2011


On Mon, Jan 31, 2011 at 9:27 AM, Nikolay Igotti
<nikolay.igotti at oracle.com> wrote:
>   Hi,
>
>  First of all, it would be nice if you tried vboxshell.py first. It's
> strongly recommended
> to use uniform bindings (vboxapi.py) in all newly developed code.
>  With it code is pretty simple:
>
> from vboxapi import VirtualBoxManager
> mgr = VirtualBoxManager(None, None)
> vbox = mgr.vbox
> name = "ubu"
> mach = vbox.findMachine(name)
> session = mgr.mgr.getSessionObject(vbox)
> progress = mach.launchVMProcess(session, "gui", "")
> progress.waitForCompletion(-1)
>

Thanks.

>  Your issue with OS name is a Python bug (http://bugs.python.org/issue1082),
> please upgrade Python to more functional version.

I can't because I need Windows 98 compatibility, and I prefer to use
single python image across all Windows OSes.

But we can change it to: (python bug1082 recommendation)
if platform.system() in ('Windows', 'Microsoft'):

>  Generally, please make your posting more relevant and compact, last 7
> postings you did to vbox-dev
> were too much for amount of real issues reported.
>

OK.

-- 
-Alexey Eromenko "Technologov"




More information about the vbox-dev mailing list