File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 66$ErrorActionPreference = " Stop"
77
88# since we do not have ca for vsphere certs, we'll just set insecure
9- Set-PowerCLIConfiguration - InvalidCertificateAction:Ignore - Confirm:$false | Out-Null
9+ Set-PowerCLIConfiguration - InvalidCertificateAction:Ignore - ParticipateInCEIP $false - Confirm:$false | Out-Null
1010$Env: GOVC_INSECURE = 1
1111
1212# Connect to vCenter
@@ -165,7 +165,7 @@ foreach ($fd in $fds)
165165 {
166166 $vmhost = Get-Random - InputObject (Get-VMHost - Location (Get-Cluster $fd.cluster ))
167167 $ovfConfig = Get-OvfConfiguration - Ovf " template-$ ( $Version ) .ova"
168- $ovfConfig.NetworkMapping.VM_Network.Value = $portgroup
168+ $ovfConfig.NetworkMapping.VM_Network.Value = $fd .network
169169 $template = Import-Vapp - Source " template-$ ( $Version ) .ova" - Name $vm_template - OvfConfiguration $ovfConfig - VMHost $vmhost - Datastore $datastoreInfo - InventoryLocation $folder - Force:$true
170170
171171 $templateVIObj = Get-View - VIObject $template.Name
You can’t perform that action at this time.
0 commit comments