Skip to content

vmware_portgroup, "hosts" or "cluster" required when logging into ESXi #2032

Open
@springer268

Description

@springer268

Using an example with the same params as the first vmware_portgroup examples page

- name: Add Management Network VM Portgroup
  community.vmware.vmware_portgroup:
    hostname: "{{ esxi_hostname }}"
    username: "{{ esxi_username }}"
    password: "{{ esxi_password }}"
    switch: "{{ vswitch_name }}"
    portgroup: "{{ portgroup_name }}"
    vlan_id: "{{ vlan_id }}"
  delegate_to: localhost

And logging into ESXi directly
This returns

fatal: [localhost]: FAILED! => {"changed": false, "msg": "one of the following is required: cluster_name, hosts"}

This behavior makes sense for vCenter, but not for ESXi, and does not follow the example in the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions