I found that the solution was to update my custom execution environment --
which applied the latest VMware SDK.
On Monday, August 15, 2022 at 7:01:57 AM UTC-7 Jason B wrote:
> We recently upgraded our venter to 7.03 and ESXI systems to v7.03 and this
> issues has started rearing its ugly head. Basically the scenario is as
> follows:
>
> - Standard Switch with a port-group name that is the same as
> Distributed Switch port-group name exists
> - When deploying a new VM via vmware_guest module - the VM is deployed
> to the Standard Switch, and not the Distributed Switch.
>
> Example:
>
> WormHoleNet on Standard Switch
> WormHoleNet on Distributed Switch
>
> Deployment code:
> ---
> - name: Clone Virtual Machine(s) from Template
> vmware_guest:
> state: 'poweredon'
> name: "{{ item }}"
> hostname: "{{ provision_vcenter_hostname }}"
> username: "{{ vcenter_user }}"
> password: "{{ vcenter_user_pswd }}"
> annotation: "{{ provision_notes }}"
> template: "{{ vmtemplate }}"
> datacenter: "{{ provision_vc_datacenter }}"
> datastore: "{{ provisioning_datastore }}"
> folder: "{{ vmfolder }}"
> cluster: "{{ provision_cluster_target }}"
> hardware:
> num_cpus: 2
> memory_mb: "{{ vmmemgb }}"
> num_cpu_cores_per_socket: 1
> hotadd_cpu: False
> hotremove_cpu: False
> hotadd_memory: False
> nested_virt: False
> scsi: 'paravirtual'
> networks:
> - name: "{{ network_zone }}"
> type: "static"
> ip: "{{ provision_ip_addresses }}"
> netmask: "{{ subnet_mask }}"
> gateway: "{{ default_gw }}"
> device_type: 'vmxnet3'
> dvswitch_name: "{{ vcenter_dvswitch }}"
> start_connected: yes
> wait_for_customization: 'yes'
> customization:
> domain: "{{ provisioning_ad_domain | lower }}"
> fullname: 'blackhole'
> orgname: 'startrek'
> password: "{{ ansible_password }}"
> timezone: '015'
> dns_servers: 123.456.890
> dns_suffix:
> - quasar
> - pulsar
> cdrom:
> type: 'none'
> force: yes
> ...
>
> I am getting the standard switch 'WormHoleNet' and not the distributed
> switch 'WormHoleNet' -- this did NOT happen when we had 6.7U3 version of
> ESXI / vCenter.
>
> Any work arounds for this ?
>
> **
>
> From Playbook Execution:
>
> ansible-playbook [core 2.12.5.post0]
> config file = None
> configured module search path = ['/home/runner/.ansible/plugins/modules',
> '/usr/share/ansible/plugins/modules']
> ansible python module location =
> /usr/local/lib/python3.8/site-packages/ansible
> ansible collection location =
> /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections
> executable location = /usr/local/bin/ansible-playbook
> python version = 3.8.13 (default, Jun 24 2022, 15:27:57) [GCC 8.5.0
> 20210514 (Red Hat 8.5.0-13)]
> jinja version = 2.10.3
> libyaml = True
>
> **
>
> community-vmware collection version: 2.7.0
>
> **
>
> See here for further discussion of this issue:
>
> vmware_guest module | vm network portgroup with same name on both standard
> and dv switches · Issue #502 · ansible-collections/community.vmware
> (github.com)
> <https://github.com/ansible-collections/community.vmware/issues/502>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1713923c-f507-46a9-b713-6f08c9f08cban%40googlegroups.com.