Starting a VM virtual machine using Python

How can I start a virtual machine from a virtual box without using heads using modules? pyvb

+3
source share
2 answers

Instead, you can use real python bindings (rather than a wrapper that invokes the VBoxManager command line in a subprocess such as pyvb) relatively easily using vboxshell.py script from a virtual window.

Or you can use it for reference documentation of python bindings. There is no documentation for python bindings and, frankly, they are not implemented in good python style. Attributes and methods are not present in __dict__, so they cannot be found by introspection (or auto-completion in ipython), and there are no dockstrings there. Another link for python bindings is the source code of the vboxweb project : VBoxWebSrv.py

For a headless start, you need to pass "without a head" to the third argument (type) of the vbox.openRemoteSession (session, uuid, type, "") method call. Take a look at the startVm () function in vboxshell.py and VBoxWebSrv.py for reference.

+11
source

python pyvbox Vbox interaface:

https://pypi.python.org/pypi/pyvbox

0

Source: https://habr.com/ru/post/1735696/


All Articles