how to list the names of available virtual machines in a virtualbox using pyvb modules. pls help.
+3
A:
A good resource to learn VBox Python API is read the implementation of vboxweb
For your specific question, you can take a look at line 289 of VBoxWebSrv.py to see how virtual machines are populated.
In a nut shell, the code could be like below:
import vboxapi
virtualBoxManager = vboxapi.VirtualBoxManager(None, None)
vbox = virtualBoxManager.vbox
vboxVMList=virtualBoxManager.getArray(vbox, 'machines')
Findekano
2010-03-03 12:32:06
tested this code on my machine and it worked perfectly (ubuntu 9.10 x64 - VirtualBox 3.0.12)
Jiaaro
2010-03-03 14:41:28