I try to create virtual lab but it's not working because of these lines :
Code: Select all
[string]$SourceHostname = 'MyESXHost'
[string]$ProdNetworkName1 = 'PortGroup1'
[string]$IsolatedNetworkName1 = 'vLAB-Network1'
[int]$IsolatedNetworkVLANID1 = '10'
[string]$ProdNetworkName2 = 'PortGroup2'
[string]$IsolatedNetworkName2 = 'vLAN-Network2'
[int]$IsolatedNetworkVLANID2 = '20'
$SourceServer = Get-VBRServer -Name $SourceHostname
$SourceNetworks = Get-VBRViServerNetworkInfo -Server $SourceServer
$DestinationServer = Get-VBRServer -Name $SourceHostname
$ProdNetwork1 = $SourceNetworks | Where-Object { ($_.Type -eq 'ViSimple') -AND ($_.NetworkName -eq $ProdNetworkName1) }
$ProdNetwork2 = $SourceNetworks | Where-Object { ($_.Type -eq "ViSimple") -AND ($_.NetworkName -eq $ProdNetworkName2) }
$NetworkMapping1Properties = @{
ProductionNetwork = $ProdNetwork1
IsolatedNetworkName = $IsolatedNetworkName1
VLANID = $IsolatedNetworkVLANID1
}
$NetworkMapping1 = New-VBRViNetworkMappingRule -Server $DestinationServer @NetworkMapping1Properties
[string]$RemapIP1 = '192.168.10.1'
[string]$MaskIP1 = '255.255.255.0'
[string]$MasqueradeIP1 = '192.168.110.0'
$VirtualLabOptions1Properties = @{
NetworkMappingRule = $NetworkMapping1
IPAddress = $RemapIP1
SubnetMask = $ProxyApplianceNetmask
MasqueradeIPAddress = $MaskIP1
DNSServer = $ProxyApplianceDNS1
}
$VirtualLabNetworkOptions1 = New-VBRViVirtualLabNetworkOptions @VirtualLabOptions1Properties
The error is :
New-VBRViVirtualLabNetworkOptions : Failed to create network options. The specified masquerade network address is not private IP address.
Au caractère Ligne:109 : 30
+ ... kOptions1 = New-VBRViVirtualLabNetworkOptions @VirtualLabOptions1Prop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-VBRViVirtualLabNetworkOptions], Exception
+ FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.NewVBRViVirtualLabNetworkOptions
=> My masquerade IP is 192.168.110.0 I don't know why it's talking about non private IP. Then, on GUI I can force it but how can I with powershell ?