2017-05-03 88 views
-1

我想在Ansible的ESXi服务器上自动创建虚拟机。我应该在VMWare ESXi服务器上安装pysphere模块。但是这个服务器不使用apt,yum或者易于安装。即使我尝试使用shell命令,也会遇到与ESXi服务器上的依赖关系相关的错误。有没有可用的解决方法?将Ansible与VMware ESXi服务器配合使用

回答

1

我应该到VMware的ESXi服务器

你为什么这么认为上安装pysphere模块?

通常您会从Ansible控制主机(本地主机)调用VM配置模块vsphere_guest,因此pysphere应安装在本地主机上,而不是ESXi服务器上。

实施例:

- hosts: localhost 
    tasks: 
    - vsphere_guest: 
     vcenter_hostname: vcenter.mydomain.local 
     username: myuser 
     password: mypass 
     guest: newvm001 
     state: absent 
     force: yes 
相关问题