You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using Azure VMware Services as a DR destination for Horizon, and using xNew-VM to clone on-prem parent VMs up to the Azure SDDC. xNew-VM (as-written) does not correctly create NICs on new VMs in the AVS SDDC because it does not have code coverage for NSX-T "Opaque" networks. I have added the code below, starting after line 145 in the original script, and it seems to work correctly.
} elseif ($switchtype-eq"nsx") {
foreach ($vmNetworkAdapterin$vmNetworkAdapters) {
# New VM Network to assign vNIC$vmnetworkname= ($vmnetworks-split",")[$count]
# Target the Opaque Network to which we need to connect$opaqueNetwork=Get-View-ViewType OpaqueNetwork |? {$_.Name-eq$vmnetworkname}
# Device Change spec for Opaque Network$dev=New-Object VMware.Vim.VirtualDeviceConfigSpec
$dev.Operation="edit"$dev.Device=$vmNetworkAdapter$dev.device.backing=New-Object VMware.Vim.VirtualEthernetCardOpaqueNetworkBackingInfo
$dev.device.backing.OpaqueNetworkId=$opaqueNetwork.Summary.OpaqueNetworkId$dev.device.backing.OpaqueNetworkType=$opaqueNetwork.Summary.OpaqueNetworkType$locationSpec.DeviceChange+=$dev$count++
}
Hello,
We're using Azure VMware Services as a DR destination for Horizon, and using xNew-VM to clone on-prem parent VMs up to the Azure SDDC. xNew-VM (as-written) does not correctly create NICs on new VMs in the AVS SDDC because it does not have code coverage for NSX-T "Opaque" networks. I have added the code below, starting after line 145 in the original script, and it seems to work correctly.
Reference:
https://networkinferno.net/powercli-and-opaque-networks
https://blogs.vmware.com/PowerCLI/2019/02/configuring-vms-opaque-networks.html
The text was updated successfully, but these errors were encountered: