Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 965
user1325696 Avatar asked Jan 31 '26 12:01

user1325696


1 Answers

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.

like image 184
Konstantin Suvorov Avatar answered Feb 03 '26 09:02

Konstantin Suvorov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!