如何使用python脚本在虚拟机上运行应用程序。未知文件后缀
如何使用python脚本在虚拟机上运行应用程序如何使用python脚本在虚拟机上运行应用程序。未知文件后缀,python,vmrun,Python,Vmrun,如何使用python脚本在虚拟机上运行应用程序 db_tool = os.path.join(r'C:\Program Files\VMware\VMware VIX\vmrun.exe') db_name=r"-T esx -h https://10.10.10.10/sdk -u user -p password -gu user -gp password runProgramInGuest '[datastore1] datastore1/datastore1.vmx' -intera
db_tool = os.path.join(r'C:\Program Files\VMware\VMware VIX\vmrun.exe')
db_name=r"-T esx -h https://10.10.10.10/sdk -u user -p password -gu user -gp password runProgramInGuest '[datastore1] datastore1/datastore1.vmx' -interactive notepad.exe"
p = subprocess.Popen([db_tool, '-T' ,'server', '-h', 'https://10.10.10.10/sdk', '-u', 'user', '-p', 'password', '-gu', 'user', '-gp', 'password', 'runProgramInGuest', '"[datastore1]"', 'datastore1/datastore1.vmx','-interactive' ,'notepad.exe']
p.communicate()
我收到以下错误:无法连接到主机。错误:无法打开VM:“[datastore1]”,未知文件后缀如果在控制台中手动运行该命令,将得到相同的结果。这不是Python的问题。另外,什么是
result\u dir
o0如上所述,这不是一个编程问题,这是一个工具/服务器问题,可以通过以下说明来解决:或询问有关服务器故障的问题。启动应用程序中的另一个错误另一个错误?什么错误?..“无法连接到主机。错误:无法打开VM:“[datastore1]”,未知的文件后缀“我不知道如何在subprocess.Popen([..”,“[datastore1]”,“'datastore1/datastore1.vmx',…]))