You can create a trunk link to VM.
https://technet.microsoft.com/en-us/library/hh848475.aspx
Generally your command will be like:
Set-VMNetworkAdapterVlan -VMname $VMName -VMNetworkAdapterName $VMNetworkAdapterName -Trunk -AllowedVlanIdList "vlan number" -NativeVlanId "vlan ID"
As far us I understand you will need to have all VMs to have trunk NIC.
Native Vlan in Hyper-V used to mark all outgoing traffic, so if you'll have VM0 NIC trunk with native vlan 50 and all other in allowed, and VM1 NIC access with Vlan 1. Then VM1 -> VM0 successfull but VM0 -> VM1 is not.(under -> I mean send packets and if they are delivered to destination, and it's not necessary guaranties successful reverse flow)
So, your VM0 should have some common to all machines VLAN X as native vlan and all needed vlans from all other VM's in allowed vlan list. Any other VM should have it's unique VLAN as native and VLAN X in allowed.
For example:
VM Name | Native Vlan | Allowed Vlan
VM1 | 1 | 1,50
VM2 | 2 | 2,50
VMn | n | n,50
VM0 | 50 | 1,2,n,50
Here VM0 -> Any VM = successful, Any VM -> VM0 = Success, and VMn -> VMm (if "n" and "m" are not 0) = fail.
Hope it helps & sorry for any grammar mistakes.
Best Answer
First Hyper-V Switches do not have a VLAN ID. Hyper-V switches belong to all VLANs. You assign a VLAN to the virtual adapters with VMs and the virtual adapters created for management.
For the sake of simplicity you should generally stick with a single Virtual Switch unless you really need to segregate traffic.
So basically you should setup your External switch, and link it to whatever interfaces you are using for VM traffic.
In your firewall VM you should have two virtual adapters, the virtual adapter you wall use as the outside adapter should be set to the default VLAN, or whatever VLAN you are using for your VMs. It will depend on the configuration of you physical adapters and switch port you are connected with. If you are not doing VLAN trucking on the switch port you are connected with, this should be the default LAN.
The inside adapter from your firewall, and the adapter on the VM that can both be connected the external switch, and they should be be assigned a VLAN ID different from the VLAN assigned to the external adapter of your firewall. This VLAN probably shouldn't already exist on your external network.
So assuming the switch your Hyper-V box connects to isn't doing any trunking and the un-tagged VLAN is the one you want to access your setup would be like this.