Routing role example

Feb 23, 2016 at 9:48 AM

Could you guys provide an example on how to create a machine with the routing role.

with regards.
Feb 23, 2016 at 12:25 PM
Edited Feb 23, 2016 at 12:28 PM
Sorry for the non-existing documentation. This is a script to setup two machines in different subnets and make sure that routing works:
$labName = 'abc'
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
Add-LabDomainDefinition -Name -AdminUser Install -AdminPassword Somepass1
Add-LabVirtualNetworkDefinition -Name net1 -AddressSpace
Add-LabVirtualNetworkDefinition -Name net2 -AddressSpace

Add-LabMachineDefinition -Name M1 -MemoryInMb 512 -Network net1 -OperatingSystem 'Windows Server 2012 R2 SERVERDATACENTER' -IpAddress -Gateway
Add-LabMachineDefinition -Name M2 -MemoryInMb 512 -Network net2 -OperatingSystem 'Windows Server 2012 R2 SERVERDATACENTER' -IpAddress -Gateway

$netAdapter = @()
$netAdapter += New-LabNetworkAdapterDefinition -VirtualSwitch net1 -Ipv4Address
$netAdapter += New-LabNetworkAdapterDefinition -VirtualSwitch net2 -Ipv4Address
$role = Get-LabMachineRoleDefinition -Role Routing
Add-LabMachineDefinition -Name Router -MemoryInMb 512 -NetworkAdapter $netAdapter -OperatingSystem 'Windows Server 2012 R2 SERVERDATACENTER' -Roles $role

Do you also need a sample for Azure?