Поделиться через


The purpose of SCVMM Network Location and Tag

 

The ‘preferred location’ and ‘preferred tag’ configured under a Virtual Netowrk Adapter in a VM, template or harware profile, are used during placement to choose hosts with the desired connection requirements and during deployment to choose the Virtual Network in the elected host that best fits your network connections requirements.

 

This way you can have you deployed VM in a host that fits your connections requirements and the VM is connected to the Virtual Netowrk that offers you the connection requirements.

The location is a VMHostNetworkAdapter property

detected from the DHCP server related to the Active Directory tree. It's empty if this property cannot be autodetected.

  • The Location property is inherited by Virtual Networks when these are attached to a physical NIC.

  • When the Virtual Network does not have any physical NIC attached, the special 'Internal Network' is associated with them.

  • The location can be overriden to any non-empty value of your choice if you don't like or you don't have the autodetected location

The tag is a Virtual Network property that helps you differentiate between Virtual Networks connected to the same location. This way you have one more level of granularity when electing the best Virtual Network.

A couple of notes:

  • When using static IP addresses for the hosts, the location is not detected as it is detected from the DHCP response.

  • When denying the host access to an External Virtual Network, the location cannot be detected since there is no IP stack on the Host partition.

A code example where we get the Locations of the virtual Networks that have a NIC attached and the locations of those Network cards:

The Virtual Network:

PS > get-virtualnetwork | where {$_.VMHostNetworkAdapters} | select Locations

Locations
---------
{}
{mylocation}

The phsyical NICs:
PS > get-virtualnetwork | where {$_.VMHostNetworkAdapters} | select -expand VMHostNetworkAdapters | select NetworkLocation

NetworkLocation
---------------

<---Empty row since there is no Location configured

mylocation