Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

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

$
0
0

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?

Thank you,
Mihai


Viewing all articles
Browse latest Browse all 8743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>