To use the VyOS router with your Virtual Machines, you simply need to connect their network adapters to the VyOS router private switch, and then optionally set the desired VLAN IDs.
- Connect your virtual machine to the VyOS router, using the following command:
Connect-VMNetworkAdapter -SwitchName "VyOS Router" -VMName "New Virtual Machine"
Replace the values for SwitchName and VMName with your own corresponding values.
- Enable VLAN identification to tag all network communications through this network adapter, using the following command:
Set-VMNetworkAdapterVlan -VMName "New Virtual Machine" -Access -VlanId 2
Replace values for VMName and VlanId with your own corresponding values. Without this optional command, the virtual machine will be located in the Untagged VLAN.
- Open Settings for the Virtual Machine.
- From the Settings windows, perform the following actions:
- Click the Virtual switch drop down list, and select VyOS Router;
- Tick Enable virtual LAN identification;
- Type the VLAN identifier that this virtual machine will use for all network communications through this network adapter; and
- Click OK.