none
VMNetworkAdapter trunk (8021q) mode for a Hyper-V Guest RRS feed

  • General discussion

  • Hello,

    I am running a Windows 2012R2 Server (Datacenter) as a Hyper-V host. On top of it I am running a Virtual Machine with CentOS 7 (I'm using the Integration Services installed by default). The VM has 1 network adapter (normal, NOT legacy). I want to configure the VMAdapter of the virtual machine in trunk mode allowing all VLANs.

    In PowerShell I executed the following commands:

    PS C:\Users\Administrator.PUB> Get-VMNetworkAdapterVlan

    VMName                VMNetworkAdapterName Mode   VlanList
    ------                -------------------- ----   --------
     test                  test                 Access 0
    PS C:\Users\Administrator.PUB> Set-VMNetworkAdapterVlan -VMName "test" -Trunk -AllowedVlanIdList 1-4094 -NativeVlanId 0
    PS C:\Users\Administrator.PUB> Get-VMNetworkAdapterVlan

    VMName                VMNetworkAdapterName Mode   VlanList
    ------                -------------------- ----   --------
    test                  test                 Trunk  0,1-4094

    At this point, the VLAN tagging is working correct. I have acces in the VM to all my VLANs using VLAN tagging (8021q). If I reboot the VM, things doesn't work anymore. I do not have acces to the tagged VLANs anymore (only the native one).

    I'm looking in the VLAN configuration of the Host and all seems ok:

    PS C:\Users\Administrator.PUB> Get-VMNetworkAdapterVlan

    VMName                VMNetworkAdapterName Mode   VlanList
    ------                -------------------- ----   --------
    test                  test                 Trunk  0,1-4094

    If I reexecute the command "Set-VMNetworkAdapterVlan -VMName "test" -Trunk -AllowedVlanIdList 1-4094 -NativeVlanId 0" all is working again. If I shutdown the VM and start it again, the things are working OK. If I reboot the machine, somehow the configuration gets lost. Has anyone experience this problem until now?

    The problem has been describe to technet forums too, but no solutions has been found (a lot of people have this issue) [1]

    Thank you,
    Mihai

    [1] https://social.technet.microsoft.com/Forums/en-US/0510733d-d52e-4942-8935-f5b23411f2bd/vmnetworkadapter-trunk-8021q-mode-for-a-hyperv-guest?forum=winserverhyperv

    Wednesday, November 19, 2014 12:12 PM