<p>Using the PowerShell <a href="http://technet.microsoft.com/en-us/library/hh848475.aspx"><code>Set-VMNetworkAdapterVlan</code></a> cmdlet, you can turn on trunk mode on the virtual NIC. I don’t think there is an equivalent GUI option for this.</p>
<pre><code class="lang-auto">Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList "100,101" -VMName "VmName" -VMNetworkAdapterName "TrunkNic" -NativeVlanId 1
</code></pre>
<ul>
<li>
<p><code>-Trunk</code> turns on trunk mode, which leaves the VLAN tags intact.</p>
</li>
<li>
<p><code>-AllowedVlanIdList</code> specifies which VLAN’s to allow the guest to use. This parameter is mandatory in trunk mode. If you have a largeish number of VLANs, you also can use ranges like <code>-AllowedVlanIdList "1-4000"</code></p>
</li>
<li>
<p><code>-NativeVlanId</code> is required, too. It specifies which VLAN outgoing untagged packets belong to. I think that it also has strips off the VLAN tag for incoming packets on that VLAN. Or something like that. I remember that there was a weird behavior here that I completely sidestepped by just setting this to an unused, blackholed VLAN and not using the untagged interface in the guest, because that was easier to configure and seemed less fragile to me.</p>
</li>
</ul>