How to enable debug logging for Hyper-V Network Virtualization

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.

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.
Svojstva

ID članka: 2968430 - Poslednji pregled: 13.02.2015. - Verzija: 1

Povratne informacije