我需要创建(导出)一个虚拟机(VirtualBox)到OVA/OVF设备。在
我尝试使用IMachine.export_to()
方法(通过pyvbox包装器),如下所示:
import virtualbox
from virtualbox.library import ExportOptions
vbox = virtualbox.VirtualBox()
vm = vbox.find_machine(VM_NAME)
appliance = vbox.create_appliance()
p = appliance.write('ovf-2.0',
[ExportOptions.create_manifest],
'~/tmp/test5.ovf')
desc = slredmine.export_to(appliance, '~/tmp/test5.ovf')
上面的代码没有实现我想要的:没有创建ova/ovf。在
更新
指令顺序错误。请看我写在下面的答案。在
根据pyvbox文档,它只能导出为OVF格式,但这并不重要,这取决于您想用它做什么。在
文件引用:
如果你被卡住了,可以随意分享你的代码。在
已解决
相关问题 更多 >
编程相关推荐