Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to enable debug logging for Hyper-V Network Virtualization


View products that this article applies to.

Introduction

This article describes how to enable debug logging and collect necessary policy information for Hyper-V Network Virtualization in Windows Server 2012 R2. The Event Trace Log (ETL) files provide useful debug logging and packet capture for troubleshooting many different network virtualization issues.

↑ Back to the top


More Information

  1. Open an elevated Windows PowerShell window on the host, and then run the following commands. The commands may wrap in your display.
  2. Collect the policy information from all the hosts that are involved in the issue. For example, these may be the hosts on which the sender and receiver guests cannot ping (send an ICMP echo request and response) each other. To do this, run the following PowerShell cmdlets:
    Start-Transcript -Path ((hostname)+"_PolicyBefore.txt")
    Get-NetVirtualizationProviderAddress | fl
    Get-NetVirtualizationProviderRoute | fl
    Get-NetVirtualizationCustomerRoute | fl
    Get-NetVirtualizationLookupRecord | fl
    Get-VMNetworkAdapter * | ft VMName, MacAddress, VirtualSubnetID, SwitchName
    Stop-Transcript
  3. Start the traces on all hosts by typing the following command in the elevated Windows PowerShell window. The generated logs file name will contain the hosts name that you are running the command on.
    Netsh trace start scenario=virtualization capture=yes capturetype=both report=disabled tracefile=((hostname)+"_events.etl") overwrite=yes 
    Note Sometimes, packet capture may bloat the file size or may not work for 10 gigabit Ethernet (GbE) TCP data transfers. In this case, we recommended that you omit the capture=yes and capturetype=both parameters.
  4. Reproduce your issue. For example, this may involve running the ping command between two virtual machines (guests). For more information about testing connectivity, refer to the "Testing VM Connectivity" section of the following Microsoft TechNet blog:
  5. As soon as you reproduce your issue, stop the traces by running the following command:
    Netsh trace stop 
  6. Collect the policy information from the hosts again by running the following PowerShell cmdlets:
    Start-Transcript -Path ((hostname)+"_PolicyAfter.txt")
    Get-NetVirtualizationProviderAddress | fl
    Get-NetVirtualizationProviderRoute | fl
    Get-NetVirtualizationCustomerRoute | fl
    Get-NetVirtualizationLookupRecord | fl
    Get-VMNetworkAdapter * | ft VMName, MacAddress, VirtualSubnetID, SwitchName
    Stop-Transcript
Note You can find the ETL and policy text files in the same directory from which you ran the commands and cmdlets.

When you report an issue to Microsoft, please share the ETL and TXT files.

↑ Back to the top


Keywords: kbexpertiseadvanced, kbsurveynew, kbhowto, kb

↑ Back to the top

Article Info
Article ID : 2968430
Revision : 1
Created on : 1/7/2017
Published on : 2/13/2015
Exists online : False
Views : 347