vmware_guest multiple adapter

16 views
Skip to first unread message

mpunix

unread,
Jul 25, 2020, 12:53:13 AM7/25/20
to Ansible Project
Hi,

I am trying to setup a RHEL7 VMware Linx VM on Vcenter 6.5 with ansible 2.9 with multiple adapters, it looks I am getting inconsistent results with the VMware adapter mac address and OS level ethx mapping. First I created with one interface (eth0), it works perfectly and matches  with VM adapter mac address and OS interface output. When I add two or three adapters with vmware_guest or vmware_guest_network module, the order of the creation works fine but on the os level mac address does not matches to the order of the VM adapter VLAN.

Example:

vars:
network_interfaces:
     - name: VLAN1
       type:static
       ip: 1.1.1.1
       netmask: 255.255.255.0
     - name: VLAN2
     - name: VLAN3

I just want to create eth0 ip/netmask during the initial VM creation and configure the eth1, eth2 with Ansible at the later stage.

On the playbook, I call the network_interfaces variable

 networks: "{{ network_interfaces }}"
 wait_for_ip_address: yes

Does anyone come across the issue? Just wondering am I missing on the network_interfaces variable definition.

Thanks in advance.

mpunix

unread,
Jul 25, 2020, 11:19:11 AM7/25/20
to Ansible Project
Hi - Just to update, it seems the issue relate to the VMXnet3 driver where VM configured with 4 or more adapters cause this ordering issue and not related to ansible module.

Reply all
Reply to author
Forward
0 new messages