---
- hosts: my-host
tasks:
- vsphere_guest:
vcenter_hostname: vcenter.mydomain.local
username: myuser
password: mypass
guest: newvm001
vmware_guest_facts: yes当我运行这个剧本时,我会得到这个错误。
扮演我的主人
任务设置*******************************************************************确定: 19.3.112.97
任务*********************************************************** vsphere_guest致命: 19.3.112.97 :失败!=> {“更改”:假,“失败”:真,"msg":"pysphere模块必需“}
没有主机留下*************************************************************警告:无法创建重试文件“createvms.retry”。
Errno 2没有这样的文件或目录:“”
弹奏重述
19.3.112.97 : ok=1 changed=0 unreachable=0 failed=1
为什么我会有这个错误?我已经卸载并安装了pysphere。我已经使用了以前和现在的版本,但我仍然会遇到这个错误。
发布于 2016-09-01 10:53:08
您通常希望从控制计算机(localhost)运行云/VM管理模块。这个应该是这样的:
---
- hosts: localhost
connection: local
tasks:
- vsphere_guest:
vcenter_hostname: vcenter.mydomain.local
username: myuser
password: mypass
guest: newvm001
vmware_guest_facts: yes在这种情况下,请使用安装在控制主机上的PySphere连接到vcenter.mydomain.local并提供VM。
在您的示例中,PySphere应该安装在19.3.112.97上,vcenter.mydomain.local应该可以从该主机访问。
https://stackoverflow.com/questions/39260610
复制相似问题