1

我为 virtualbox 制作了一个命令行界面,以便可以从远程机器控制 virtualbox。现在我正在尝试使用 python virtualbox api 实现命令行接口。为此,我下载了 pyvb 包(python api 文档显示了可用于在 pyvb 包下实现此功能的函数)。但是当我给时pyvb.startVM(self,"name of vm",type='gui'),它显示一个错误:

AttributeError: 'module' object has no attribute 'startVM'
4

1 回答 1

3

startVM is in pyvb.vb.VB class. Also, it's not 'name of vm', as docs explain startVM should be called with pyvb.vm.vbVM as a first parameter and not a string.

于 2010-02-11T12:49:29.820 回答