A cOS Core virtual machine can have virtual adapters which perform VLAN filtering. Configuring this on an adapter is done with the following steps:
Set-VMNetworkAdapterVlan
-VMName <vm-name>
-VMNetworkAdapterName "<adapter>"
-Trunk
-AllowedVlanIdList "1-4094"
-NativeVlanId 0
Note that this can only be done using PowerShell.
Enable MAC address spoofing on the virtual network adapter.
This can be done when configuring the virtual machine using Hyper-V Manager (see Section 3.1, Using Hyper-V Manager) or when using Powershell (see Section 3.2, Using PowerShell).