Can I manage guest VMs in vSphere free using Ansible without vCenter?

喜欢而已 提交于 2019-12-12 05:27:11

问题


Seems to me that most of the existing Ansible modules require vCenter. For example guest_module has required parameter vcenter_hostname. The question is - is there an ability to manage 2-3 vSphere hosts using Ansible? I need creating virtual environments(virtual networks, guest VMs, load balancing endpoints).

I also considered Hyper-v but it doesn't have Ansible modules. Direct powershell management considered as a last resort for Hyper-v.


回答1:


Yes, you can do things that are allowed by free license.

There's a hint in the docs:

For standalone ESXi hosts, ha-datacenter should be used as the datacenter name

I use vsphere_guest without any problems with standalone hypervisors with the following parameters filled in:

- vsphere_guest:
    vcenter_hostname: "{{ esxi_ip_or_dns }}" # ip address of hypervisor
    esxi:
      datacenter: ha-datacenter
      hostname: "{{ esxi_hostname }}" # name shown in hypervisor console
    username: "{{ esxi_username }}"
    password: "{{ esxi_password }}"

But keep in mind, that many useful features are blocked in free license. For example, you can't clone VMs without vCenter license.



来源:https://stackoverflow.com/questions/43420285/can-i-manage-guest-vms-in-vsphere-free-using-ansible-without-vcenter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!