-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmware_guest always change network port on dvs #498
Comments
Files identified in the description: If these files are inaccurate, please update the |
Files identified in the description:
If these files are inaccurate, please update the |
I have verified the same in my environment. When I clone the VM, the NIC is modified, and causing a brief hiccup. |
Also verified on vSphere 6.7 with ansible 2.10.8 and community.vmware 1.9.0, also ansible 2.11.0 and community.vmware 1.9.1-dev8. Reconfigured test100.lab.shakey.org on esx1.lab.shakey.org in Datacenter. Modified: config.hardware.device(4000).backing.port.portKey: "212" -> "211"; config.hardware.device(4000).backing.port.connectionCookie: 865024454 -> 982707693; Added: Deleted: |
I have this exact same issue. Always the In my case every time I run the playbook the port key alternates between two values, but it is always changed. |
Update: I've pinpointed the problem to the check on line 1985 of I added some debug logging to this section to figure out exactly what comparison was being made. I then ran my playbook and could see that the value of This means the comparison fails, and I'll continue investigating tomorrow to see if this can be solved. |
I haven't made much progress, from what I can tell the name just isn't available from the network devices attached to the VM. I think we'd need to see if what looks like the DVSwitch UUID we do get back can be matched to the right UUID in a list of all DVSwitches, and use that to lookup the name to see if it is correct? |
+1 |
Also verified on vSphere 7.0.2 with ansible 2.12.2 and community.vmware 2.1.0 |
Still appears to be present @Akasurde any update? |
I stumbled across this issue now too. |
Still the same: |
Hi, total noob here, feel free to ignore. I have what I belive is the same issue, but for me the problem went away when I used "state: poweredon" instead of "state: present" on the vmware_guest. I have no clue why this makes a differense, but it does for me. vSphere: 7.0.3 |
It is not solution. Your playbook with state "powerdon" will check only VM powered on or exists, but won't check and reconfigure VM hardware if VM is already exists. |
I have the same issue. Ansible: 2.15.0 |
Any update? |
It is obvious that this module is not idempotent in the part of the code responsible for the network. Unfortunately, there are currently few maintainers working on the collection and it will take a lot of time to correct this non-idempotent behavior. If I can reproduce the problem and have time, I will look into this problem. |
SUMMARY
vmware_guest task always in changed state because module change network of vm and it reconnects to distributed switch port
ISSUE TYPE
COMPONENT NAME
vmware_guest
networks
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
CentOS Linux release 8.1.1911 (Core)
Python 3.6.8
vCenter 6.5
ESXi 6.5
STEPS TO REPRODUCE
Any simple playbook with vm creation. For example:
start this playbook 2+ times
EXPECTED RESULTS
ACTUAL RESULTS
In vSphere i see reconfigure event every time i start playbook
Reconfigured test-ans on esxi-075 in vDC-01. Modified: config.hardware.device(4000).backing.port.portKey: "4828" -> "4823"; config.hardware.device(4000).backing.port.connectionCookie: 1926530792 -> 2069119207; Added: Deleted:
The text was updated successfully, but these errors were encountered: