如何在 python 中使用 VixVM_RunProgramInGuest vix 库? [英] How can use VixVM_RunProgramInGuest vix library in python?

查看:65
本文介绍了如何在 python 中使用 VixVM_RunProgramInGuest vix 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 python 中使用 RunProgramInGuest 函数在 vm_ware 工作站中运行应用程序,但我不能,因为我不知道参考.我想要函数的简单代码,谢谢.

Hi I want use RunProgramInGuest function in python for running application in vm_ware workstation but I can't Because I don't know the reference. I want the simple code for the function thanks in advance.

推荐答案

你可能会发现 vix 很有用(可以找到@https://github.com/naim94a/vix 或使用 pip install vix).该库以安全的方式 (RAII) 包装了 VIX API,并且是面向对象的.

You might find vix useful (can be found @ https://github.com/naim94a/vix or with pip install vix). This library wraps the VIX API in a safe way (RAII) and is object oriented.

import vix

host = vix.VixHost()
host.connect()

vm = host.open_vm("C:\\Virtual Machines\\MyVM.vmx")
vm.login(username="GuestUserName", password="GuestPassword")

vm.proc_run("C:\\GuestExecutable.exe")

当然,如果您想自己封装调用,可以在此处找到官方文档:https://www.vmware.com/support/developer/vix-api/vix115_reference/index2.html

Of course, if you would like to wrap the calls yourself the official documentation can be found here: https://www.vmware.com/support/developer/vix-api/vix115_reference/index2.html

这篇关于如何在 python 中使用 VixVM_RunProgramInGuest vix 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆