我正在尝试在vcenter server设备上运行Pyvmomi社区示例中的一些示例脚本: https://github.com/vmware/pyvmomi-community-samples
Caught vmodl fault : Permission to perform this operation was denied.
用另一个简单的脚本:
from pyVim.connect import SmartConnect, Disconnect
import ssl
s = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
s.verify_mode = ssl.CERT_NONE
c = SmartConnect(host="IP", user="USER", pwd='PWD', sslContext=s)
datacenter = c.content.rootFolder.childEntity[0]
vms = datacenter.vmFolder.childEntity
for i in vms:
print(i.name)
Disconnect(c)
如果我使用我的域用户帐户(使用该帐户可以登录vcenter):
Cannot complete login due to an incorrect user name or password.
我使用域\用户名作为用户。在
或作为根目录:
Permission to perform this operation was denied.
我在vcenter server中添加了一些权限,但显然不够:(。在
我也面临着同样的问题,我补充说,它起作用了。 需要添加端口作为参数, 改变这个
到
^{pr2}$相关问题 更多 >
编程相关推荐