Hey. I’m using PowerCLI 12.0.0, and I have an issue with a script that is used to Import/Export templates between vCenters.
I am using Export-Vapp to export the template to an OVA, and then have logic to map the configuration appropriately to the destination and use Import-Vapp to perform the import.
At one point in my script, I am using Get-OvfConfiguration to retrieve the NetworkMapping of the template, and map the network before Importing the template to the destination.
The problem I am running into is that I have network names that include DOTS, e.g. VC_Automation_Net-Mgmt_10.10.10.10_23
So when the Get-OvfConfiguration runs, the NetworkMapping is truncated, and the associated object is malformed, making it (seemingly) impossible to map the network for the destination and perform the Import-Vapp. I have inspected the OVA file, and the network is represented correctly in the XML (dots and all).
This has worked fine for months with non-dotted networks, but due to some Lifecycle management, I have had to move my image processes to a different cluster, and this is the hand I have been dealt. Is this a bug? Is there a workaround? At this point, renaming the networks does not appear to be a solution… Any ideas would be greatly appreciated.
D:ovatemp> Get-OvfConfiguration -Ovf D:ovatempw2k12r2-ehc-202008-temp.ova | select -ExpandProperty NetworkMapping
VC_Automation_Net-Mgmt_10
————————-
System.Object