VLAN Settings and Hyper-V

VLAN Settings and Hyper-V

  • Comments 12

One of the features of Hyper-V is VLAN support.  This is a little bit confusing - so let me explain how it works.

For every virtual network adapter you connect to a virtual machine you can specify a VLAN ID to be used by that virtual machine.  In order for this to work you need:

  • A physical network adapter that supports VLANs.
  • A physical network adapter that will accept network packets with VLAN IDs already applied (not all network adapters support this).
  • To configure your switch to allow network traffic on the physical port for the VLAN IDs that you want to use inside virtual machines.

You can also specify a VLAN ID on the virtual network switch configuration.  This is not the default VLAN ID to be used for the virtual network switch (as some assume) but it is the VLAN ID that will be used by the parent partition virtual network adapter that is connected to the virtual network switch (as discussed here).  It is possible to connect multiple virtual machines using different VLAN IDs to the same virtual network switch (but of course they will not be able network with each other).

Cheers,
Ben

Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post
  • One of my customers is planning to deploy Microsoft Virtual Server. He plans to use it in a VLAN. The scenario proposed is as under :

    • It is proposed to run multiple VMs on a physical server with multiple physical interfaces, using Microsoft Virtual Server

    • These physical interfaces will be connected to individual VLAN ports on the customer’s managed switch

    • We need to map each physical interface to specific VM so that the applications on the VMs will not talk to each other

    Please let us know if Step 3 is possible, ie., can we assign a specific physical interface to a virtual machine instance?

  • Using a cluster of HyperV servers, I create a VM and assign it to one particular vlan.

    The network configuration is OK, and the same for both HyperV servers and from the cisco-side too.

    But when doing a Quick Migration of the VM, this one lose the vlan configuration, and I have to reconfigure it one the passive node in order to retrieve the network connection on the VM.

    Once I do that, everything works fine, and I can "Quick Maigrate" my VM from one node to another as if I don't have a vlan configuration.

    Am I the only one to have this trouble ?

  • Hari -

    Yes, this is possible.

    Xavier -

    This is a known issue that we are working on fixing.

    Cheers,

    Ben

  • Having an issue with regular virtualized network configuration.  The host system has a single nic and is working fine.  Creating a new instance configures a virtual network adapter but an xp install into the VM is failing to see the virtual NIC (no network card is seen).  Any idea where to start trouble shooting this?

    Also, a minor annoyance.  To free the mouse it says use ctrl-alt-left arrow.  In WS2008 thats switches the screen orientation so having to ctrl-alt-delete and cancel to free the mouse each time.  I even disabled the screen orientation in the video driver and still no dice.  Now ctrl-alt-left arrow just does nothing.  Anyone bumping into this too?

  • @Pete: I'm seeing the same thing.  I would love to hear a resolution, if one exists.

  • Is there a way to know, before buying it, if a "physical network adapter will accept network packets with VLAN IDs already applied " ?

    For example, I found Intel PRO/1000 PT is good, Intel PRO/1000 GT is not ... and the details of both say the same identical things about VLAN-802.1q [SUPPORTED] :-(((

    Thank you

  • For PETE and CS: you missed to install the integration tools.

    They usually are in c:\windows\system32\vmguest.iso

    Have  a nice week-end !

  • Julian -

    Unfortunately, I do not know of anyway to know if your network adapter supports this short of reading a lot of documentation from the network adapter vendors.

    Cheers,

    Ben

  • Hi,

    I'm trying to create the folowing configuration:

    - Physical Ethernet interface connected to a switch's tagged VLAN port (it has 6 different network with different VLAN tags)

    - Virtual Switch connected to the interface above

    - Single Legacy Network Adapter Connected to a Virtual Machine

    - Debian Linux in the VM configured to communicate on all of the VLAN's mentioned above.

    If I understand correcty, this configuration is possible:

    "It is also possible to configure a virtual network adapter so that it can receive network traffic from multiple VLANs, however this is not exposed through the user interface and you need to make such a configuration using the WMI interfaces."

    I tried it, but I failed.

    If I'm correct I have to switch the Virtual Interface into tagged mode. I digged into my system. To switch the adapter to trunk mode I have to set the virtual port's Msvm_VLANEndpoint objects DesiredEndpointMode property to 5. When I do this I get a not supported property. It looks like that it is because the Msvm_VLANEndpoint's SupportedEndpointModes property array only contains one element what is 2 (Access mode)

    The only adapter what I found in the system that supports trunk mode is the physical network adapter itself.

    Please tell me where is the flow in the concept above.

    Thank you

    Zoltán

  • All hyper-v hosts are having with single NIC card and all VM’s and HOSTS are assigned with single subnet ie 192.168.0.x/24. all hosts are connected to single 8 port switch.i would definitely say  http://blogs.msdn.com/ and http://www.hypervhd.com are very big source of hyper-v info

  • A quick question: Could you define exactly what a VLAN is in the context of your response?  I have created VLANs using the multiple internal networks and port filtering via the switches.  Further, I think if one gets creative, you can plumb up multiple VIRTUAL NETWORKS as in Network ID 1-9 inside Hyper-V

    So, that said, I am trying to understand how this fits into the network infrastructure external to Hyper-V box, and what precisely Hyper-V's network stack is providing for overall integration into a heterogeneous network infrastructure.  By heterogeneous, I am thinking of a standards based approach (protocols or practices) that work regardless of the router and switch vendors in place.

    Thanks!

    Paul

  • Hi Ben,

    thank you for your article.

    According to your post:"It is also possible to configure a virtual network adapter so that it can receive network traffic from multiple VLANs, however this is not exposed through the user interface and you need to

    make such a configuration using the WMI interfaces."

    Could you please explain how to do that on MS Windows Server 2008 R2 SP1 with the Hyper-V role enabled?

Page 1 of 1 (12 items)