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:
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