Description of problem:
Trying to provision a VM through automate and the following methods are not working. These methods worked in CloudForms 4.1 and are failing after the upgrade to CloudForms 4.2
selected_network = "dvs_FCS Cloud Network"
prov.set_option(:vlan , selected_network )
Version-Release number of selected component (if applicable):
Steps to Reproduce:
We found that the DistributedVirtualPortgroup MOR and the key while typically are equal do not have to be. When they are not equal we are setting the portgroupKey to be the MOR and VMware fails to find the portgroup.
We need to store the dvportgroup.key in uid_ems instead of dvportgroup.MOR.
Created attachment 1242996 [details]
Workaround is to revert the app/models/manageiq/providers/vmware/infra_manager/provision/configuration/network.rb file back to 4.1 (attached) which looks up the dvportgroup from the VC instead of the database.
I was able to reproduce this issue by importing a DVSwitch from another VC and selecting Preserve original switch and port identifiers.
I have a PR to fix the issue, https://github.com/ManageIQ/manageiq-providers-vmware/pull/5
I'm attaching a refresh_parser.rb file from 5.7 with the change from that PR included, can you have the customer copy this file to /var/www/miq/vmdb/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb, restart evmserver, and try to reproduce?
Created attachment 1244342 [details]
126.96.36.199 dvPortgroup uid_ems hotfix
app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb from 188.8.131.52 with https://github.com/ManageIQ/manageiq-providers-vmware/pull/5 applied