What are the benefits of using the Python Virtualbox API?

What is the advantage of using python virtual machine APIs instead of using XPCOM?

+7
python virtualbox xpcom
source share
3 answers

The advantage is that pyvb is much easier to work with.

In contrast, the documentation for the python XPCOM API does not exist, and the API is not python at all. You cannot do introspection to find methods / attributes of an object, etc. So you need to check the C ++ source to find how it works, or some python scripts written (e.g. vboxshell.py and VBoxWebSrv.py ).

Pyvb, on the other hand, is really just a python shell invoking VirtuaBoxManager on the command line. I do not know if this is a real flaw or not?

+6
source share

I would generally recommend against one. If you need to use virtualization programmatically, take a look at libvirt, which will give you a cross-platform and hypervisor support; which allows you to use kvm / xen / vz / vmware later.

However, the SOAP api uses two additional levels of abstraction (client and server side of the HTTP transaction), which is pretty clear, but just calls the XPCOM interface.

If you only need localhost support, use XPCOM. The additional indirectness of libvirt / SOAP will not help you. If you need to access virtual boxing on different hosts on multiple client machines, use SOAP or libvirt. If you want to use cross-platform or run your code on Linux, use libvirt.

+4
source share

From sun site to python VirtualBox APIs :

SOAP allows you to manage remote HTTP virtual machines, while XPCOM is much more high-performance and provides certain functionality not available in SOAP.

They use very different technologies (SOAP is procedural, and XPCOM is OOP), but since the API is the same VirtualBox functionality, we kept the bindings original semantics, so the connection is established, the code can be written so that people donโ€™t worry that message channel with an instance of VirtualBox b.

From this article, I am having problems with the difference between the "python virtualbox API" and "XPCOM". Could you provide a link to the API you are thinking of?

+1
source share

All Articles